AuthenticationManager class
The user authentication manager.
Constructors
Authentication |
Creates a new instance of the |
Properties
default |
Methods
get(string) | |
sign |
Signs out a user. |
sign |
Signs in a user. |
Constructor Details
AuthenticationManager<TState>(Application<TState>, AuthenticationOptions, Storage)
Creates a new instance of the AuthenticationManager
class.
new AuthenticationManager(app: Application<TState>, options: AuthenticationOptions, storage?: Storage)
Parameters
- app
-
Application<TState>
The application instance.
- options
- AuthenticationOptions
Authentication options.
- storage
-
Storage
A storage instance otherwise Memory Storage is used.
Property Details
default
default: string
Property Value
string
Method Details
get(string)
function get(name: string): Authentication<TState>
Parameters
- name
-
string
The setting name.
Returns
Authentication<TState>
The authentication instance.
signOutUser(TurnContext, TState, string)
Signs out a user.
function signOutUser(context: TurnContext, state: TState, settingName?: string): Promise<void>
Parameters
- context
-
TurnContext
The turn context.
- state
-
TState
The turn state.
- settingName
-
string
Optional. The name of the setting to use. If not specified, the default setting name is used.
Returns
Promise<void>
signUserIn(TurnContext, TState, string)
Signs in a user.
function signUserIn(context: TurnContext, state: TState, settingName?: string): Promise<SignInResponse>
Parameters
- context
-
TurnContext
The turn context.
- state
-
TState
The turn state.
- settingName
-
string
Optional. The name of the setting to use. If not specified, the default setting name is used.
Returns
Promise<SignInResponse>
The sign in response.