🔐 OIDC back-channel logout (#521)
* feat: oidc backchannel session storage * feat: oidc backchannel logout * ref: e2e test * 🛠️ Code review * ♻️ Do not mock internal auth token but call "/login" with oidc_token instead * ♻️ Refactoring for back-channel logout test * fix: feedback and e2e tests * feat: more e2e tests * ♻️ Added test to test multiple login requests flow * ref: jwt sid verifier and e2e tests --------- Co-authored-by: Monta <monta@HP-ProBook-445-14-inch-G9-Notebook-PC-505aadfc.localdomain> Co-authored-by: Anton SHEPILOV <ashepilov@linagora.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { merge } from "lodash";
|
||||
import { Column, Entity } from "../../../core/platform/services/database/services/orm/decorators";
|
||||
|
||||
export const TYPE = "session";
|
||||
|
||||
@Entity(TYPE, {
|
||||
primaryKey: [["company_id"], "sid"],
|
||||
globalIndexes: [["sid"]],
|
||||
type: TYPE,
|
||||
})
|
||||
export default class Session {
|
||||
@Column("company_id", "uuid")
|
||||
company_id: string;
|
||||
|
||||
@Column("sub", "string")
|
||||
sub: string;
|
||||
|
||||
@Column("sid", "string")
|
||||
sid: string;
|
||||
}
|
||||
|
||||
export type UserSessionPrimaryKey = Pick<Session, "sid">;
|
||||
|
||||
export function getInstance(session: Partial<Session> & UserSessionPrimaryKey): Session {
|
||||
return merge(new Session(), session);
|
||||
}
|
||||
Reference in New Issue
Block a user