OAuth APIs

OAuth APIs manage OAuth tokens and provide access to all OAuth methods in the available OAuth classes.

OAuth client APIs

The OAuth client API provides methods to request and revoke OAuth tokens.

The OAuth client provides these classes:

You can also customize the OAuthUtil script include to intercept the request parameters and also parse the responses from external OAuth providers.

When using OAuth classes in a scoped script, use the sn_auth namespace identifier.

Scoped OAuth APIs

OAuth supports application scoping by providing access to all OAuth methods in the available OAuth classes using the sn_auth namespace identifier.

For example, the following code accesses the requestToken:

var oAuthClient = new sn_auth.GlideOAuthClient( );
var tokenResponse = oAuthClient.requestTokenByRequest('TestClient',text );

When using these methods in the global scope, omit the sn_auth namespace identifier.