path: `${this.proxyPrefix}/`,
secure: this.secureAuthOnly,
});
+ res.setHeader(Enum.Header.SetLogin, Enum.LoginState.LoggedIn);
return true;
}
path: `${this.proxyPrefix}/`,
secure: this.secureAuthOnly,
});
+ res.setHeader(Enum.Header.SetLogin, Enum.LoginState.LoggedOut);
res.statusCode = 302;
res.setHeader(Enum.Header.Location, `${loginPath}?r=${encodeURIComponent(req.url)}`);
Cookie: 'Cookie',
Location: 'Location',
SetCookie: 'Set-Cookie',
+ SetLogin: 'Set-Login',
WWWAuthenticate: 'WWW-Authenticate',
},
+ LoginState: {
+ LoggedIn: 'logged-in',
+ LoggedOut: 'logged-out',
+ },
SessionCookie: 'squeepSession',
OTPResult: {
Valid: 'Valid',
}
await this._sessionCookieSet(res, session);
+ res.setHeader(Enum.Header.SetLogin, Enum.LoginState.LoggedIn);
res.setHeader(Enum.Header.Location, authorizationEndpoint.href);
res.statusCode = 302; // Found
res.end();
authenticatedIdentifier: state.authenticatedIdentifier,
};
await this._sessionCookieSet(res, ctx.session);
+ res.setHeader(Enum.Header.SetLogin, Enum.LoginState.LoggedIn);
res.statusCode = 302;
res.setHeader(Enum.Header.Location, state.redirect);
res.end();
authenticatedIdentifier: ctx.authenticationId,
};
await this._sessionCookieSet(res, ctx.session);
+ res.setHeader(Enum.Header.SetLogin, Enum.LoginState.LoggedIn);
res.statusCode = 302;
res.setHeader(Enum.Header.Location, redirect);
res.end();
this.logger.debug(_scope, 'called', { ctx });
await this._sessionCookieClear(res);
+ res.setHeader(Enum.Header.SetLogin, Enum.LoginState.LoggedOut);
const redirect = ctx.queryParams['r'] || './';
};
await this._sessionCookieSet(res, ctx.session);
+ res.setHeader(Enum.Header.SetLogin, Enum.LoginState.LoggedIn);
res.statusCode = 302;
res.setHeader(Enum.Header.Location, redirect);
res.end();