UNPKG

@studyportals/sp-hs-misc

Version:

Miscellaneous code used in HouseStark's projects

49 lines (48 loc) 1.89 kB
import { ISuccessfulAuthenticationResult } from "./i-successful-authentication-result.interface"; /** * Provides the necessary functionality to manipulate a user session. * * @deprecated Use @studyportals/client-internal-platform-sso */ interface IUserSessionOperationsProvider { /** * Gets the authorization that can be used to sign a request so that the * receiving party recognizes the identity of the currently logged in user. */ getAuthorization(): string; /** * Takes the necessary measures to keep the manipulated user session alive. */ keepAlive(): void; /** * Configures the manipulated user session using the information provided by * the specidfied authentication result. * * @param authenticationResult The result of a successful authentication. */ setupFromSuccessfulAuthentication(authenticationResult: ISuccessfulAuthenticationResult): void; /** * Configures the manipulated user session using the information provided by * the specidfied authentication result. * * Takes the necessary measures to keep the manipulated user session alive. * * @param authenticationResult The result of a successful authentication. */ setupFromSuccessfulAuthenticationAndKeepAlive(authenticationResult: ISuccessfulAuthenticationResult): void; /** * Returns a value that specifies if the user session has been setup and * has not expired. */ isSessionSetupAndNotExpired(): boolean; /** * Takes the necessary measures to keep the manipulated user session alive * only if the user session has been setup and has not expired. */ keepAliveIfSetupAndNotExpired(): void; /** * Destroys the manipulated user session so that the user is logged out. */ destroy(): void; } export { IUserSessionOperationsProvider };