import OAuth2ConnectorBase from '@hoist/oauth-connector/src/oauth2_connector.js'
OAuth2ConnectorBase
Implements:
Constructor Summary
Protected Constructor | ||
protected |
constructor(configuration: object) |
Method Summary
Public Methods | ||
public |
authorize(authorization: <AuthorizationStore>) authorize the oauth connection with existing parameters
|
|
public |
receiveBounce(authorization: AuthorizationStore): * |
Protected Methods | ||
protected |
_accessParams(authorization: AuthorizationStore): Promise<object> Populate any extra params needed to request the access token
|
|
protected |
_authorizeParams(authorization: AuthorizationStore): Promise<object> Populate any extra params needed to grant access
|
Protected Constructors
protected constructor(configuration: object) source
Params:
Name | Type | Attribute | Description |
configuration | object | the configuration details for this connector |
|
configuration.clientId | string | the OAuth2 client id |
|
configuration.clientSecret | string | the OAuth2 client secret |
|
configuration.baseSite | string | the base uri to use for authorization calls |
|
configuration.authorizationPath | string |
|
the path to send users to authorise access |
configuration.accessTokenPath | string |
|
the path to use to retrieve access tokens |
configuration.customHeaders | object |
|
any custom headers to send |
Public Methods
public authorize(authorization: <AuthorizationStore>) source
authorize the oauth connection with existing parameters
Params:
Name | Type | Attribute | Description |
authorization | <AuthorizationStore> | the users authorization |
public receiveBounce(authorization: AuthorizationStore): * source
Params:
Name | Type | Attribute | Description |
authorization | AuthorizationStore | the users authorization |
Return:
* |
Protected Methods
protected _accessParams(authorization: AuthorizationStore): Promise<object> source
Populate any extra params needed to request the access token
Params:
Name | Type | Attribute | Description |
authorization | AuthorizationStore | the users authorisation store |
protected _authorizeParams(authorization: AuthorizationStore): Promise<object> source
Populate any extra params needed to grant access
Params:
Name | Type | Attribute | Description |
authorization | AuthorizationStore | the users authorisation store |