WLAuthorizationManager
This class manages the OAuth interaction between the device and the authorization server.
Method Summary
Public Methods | ||
public |
clearAccessToken(scope: string) Clears the provided access token. |
|
public |
Logs in to the specified security check. |
|
public |
Logs out of a specified security check |
|
public |
async obtainAccessToken(scope: string): Promise<string> Initiates the OAuth flow with the MobileFirst server to get an access token for the specified resource scope. |
Public Methods
public clearAccessToken(scope: string) source
Clears the provided access token. Note: When failing to access a resource with an obtained token, call the clearAccessToken method to clear the invalid token before calling WLAuthorizationManager.obtainAccessToken to obtain a new access token.
Params:
Name | Type | Attribute | Description |
scope | string | The scope whose access token must be cleared. |
public async login(securityCheck: string, credentials: Object): Promise<string> source
Logs in to the specified security check.
public async logout(securityCheck: string): Promise<string> source
Logs out of a specified security check
Params:
Name | Type | Attribute | Description |
securityCheck | string | The security check to log out of |