Class: OAuth2ClientManager

OAuth2ClientManager(optionsopt)

new OAuth2ClientManager(optionsopt)

Construct an OAuth2ClientManager, which handles creating and getting OAuth2Clients

Parameters:
Name Type Attributes Description
options Object <optional>
Properties
Name Type Attributes Default Description
allowMultipleClients boolean <optional>
true

Enable multiple OAuth2 clients

Methods

createClient(options) → {OAuth2Client|Error}

Factory method that will create a OAuth2Client.

Parameters:
Name Type Description
options Object
Properties
Name Type Attributes Default Description
id string <optional>

OAuth2 client identifier, or auto-generated uuid

url string

OAuth2 authorization url

tokenEndpoint string

OAuth2 token endpoint

key string

OAuth2 client key

secret string

OAuth2 client secret

refreshingEnabled string <optional>
true

OAuth2 refresh grant enabled

allowMultipleAccounts string

Specifies whether multiple accounts per client are allowed

Returns:
Type
OAuth2Client | Error

getClient(clientIdopt) → {OAuth2Client|Error}

Method that will return the client asked for, or the only one present in this manager.

Parameters:
Name Type Attributes Description
clientId <optional>
Returns:
Type
OAuth2Client | Error