getAuthInstance(config)
Obtains an instance of the PegaAuth class that contains helper functions for the OAUTH2.0 registration in Constellation applications.
Returns
The instance of the PegaAuth class as an object.
Parameters
Name | Type | Description | Required |
config | object | The object that contains the clientID, clientSecret, and endPoints properties that help in obtaining an instance of the PegaAuth class. | ✅ |
Usage example
In this example, the API returns an instance of the PegaAuth class.
const config = {
clientId: 'clientId',
clientSecret: 'client_secret_value',
endPoints: {
token:'token_endpoint',
revoke:'revoke_endpoint',
authorize:'authorize_endpoint'
}
};
PCore.getAuthUtils().getAuthInstance(config);
Previous topic APIs in the AuthUtils module Next topic revokeTokens()