UserAuth | @here/olp-sdk-ts
Class UserAuth
Hierarchy
- UserAuth
Index
Constructors
Methods
Constructors
constructor
Creates the UserAuth instance.
Parameters
config: UserAuthConfig
Parameters for authentication.
Returns UserAuth
The UserAuth instance.
Methods
get Token
Retrieves the access token.
Returns Promise<string>
The access token if it is valid, or an error if at least one of the following credentials is not stated: access key ID or access key secret.
get User Info
Retrieves user data.
Parameters
userToken: string
The string that contains the user token.
Returns Promise<UserInfo>
The
jsonobject with the user data.
validate Access Token
Validates the access token.
Parameters
token: string
The string containing the token.
Returns Promise<string | boolean>
True if the access token is valid, false otherwise.
Generated using TypeDoc
Used to get and validate an access token, and to get user data.