Constructors
constructor
- new UserSession(options?): UserSession
Parameters
Optional
options: {
appConfig?: AppConfig;
sessionOptions?: SessionOptions;
sessionStore?: SessionDataStore;
}
Optional
appConfig?: AppConfig
Optional
sessionOptions?: SessionOptions
Optional
sessionStore?: SessionDataStore
Properties
appConfig
store
store: SessionDataStore
Methods
decryptContent
- decryptContent(content, options?): Promise<string | Uint8Array>
Parameters
content: string
Optional
options: {
privateKey?: string;
}
Optional
privateKey?: string
Returns Promise<string | Uint8Array>
encryptContent
- encryptContent(content, options?): Promise<string>
Parameters
content: string | Uint8Array
Optional
options: EncryptContentOptions
Returns Promise<string>
generateAndStoreTransitKey
- generateAndStoreTransitKey(): string
Returns string
getAuthResponseToken
- getAuthResponseToken(): string
Returns string
handlePendingSignIn
- handlePendingSignIn(authResponseToken?, fetchFn?): Promise<UserData>
Parameters
Optional
authResponseToken: string
Optional
fetchFn: FetchFn
Returns Promise<UserData>
isSignInPending
- isSignInPending(): boolean
Returns boolean
isUserSignedIn
- isUserSignedIn(): boolean
Returns boolean
loadUserData
- loadUserData(): UserData
makeAuthRequest
- makeAuthRequest(...args): string
Parameters
Rest
...args: [transitKey?: string, redirectURI?: string, manifestURI?: string, scopes?: string[], appDomain?: string, expiresAt?: number, extraParams?: any]
Returns string
makeAuthRequestToken
- makeAuthRequestToken(transitKey?, redirectURI?, manifestURI?, scopes?, appDomain?, expiresAt?, extraParams?): string
Parameters
Optional
transitKey: string
Optional
redirectURI: string
Optional
manifestURI: string
Optional
scopes: string[]
Optional
appDomain: string
Optional
expiresAt: number
Optional
extraParams: any
Returns string
signUserOut
- signUserOut(redirectURL?): void
Parameters
Optional
redirectURL: string
Returns void