Page History
Cache | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
build(api)Creates an OAuth service that can be used to obtain an access token and access protected data. Parameters Returns Supported Clients Sample callback(callback, timeout)Configure the service with a callback function to be executed when the service is ready to use.
After the access token is returned by the server, this callback function is executed. Parameters Returns Supported Clients Sample clientSecret(clientSecret)Set the client secret of the application. Parameters Returns Supported Clients Sample deeplink(deeplink)OPTIONAL This is a way to override the default deeplink method name, which is 'deeplink_svy_oauth'.
The deeplink method is a global method that receives the code needed to obtain the access token from the OAuth provider.
NOTE: The deeplink method name is strongly related to the redirect url configured for the application.
If the OAuth provider (eg. Microsoft AD, Likedin) requires to configure a full redirect url then it should be of the form:
https://example.com/<solution_name>/m/<deeplinkmethod> - where <deeplinkmethod> is the name configured with the service builder
https://example.com/<solution_name>/m/deeplink_svy_oauth - if the deeplink method name was not overridden
If the deeplink method with the provided name does not exist in the solution,
then a default deeplink method is generated under the hood with the solution model.
If a global method with the provided name already exists in the solution, then it should set the access
token on the service and handle possible errors. Parameters Returns Supported Clients Sample defaultScope(scope)Request always the same scope.
Scope is a mechanism in OAuth 2.0 to limit an application's access to a user's account.
An application can request one or more scopes, separated by space.
This information is then presented to the user in the consent screen, and the access token issued
to the application will be limited to the scopes granted. Parameters Returns Supported Clients Sample scope(scope)Request any unique scope per each access token request.
Scope is a mechanism in OAuth 2.0 to limit an application's access to a user's account.
An application can request one or more scopes, separated by space.
This information is then presented to the user in the consent screen, and the access token issued
to the application will be limited to the scopes granted. Parameters Returns Supported Clients Sample state(state)Configures the anti forgery session state. This is required in some APIs (like Facebook's). Parameters Returns Supported Clients Sample tenant(tenant)Set the tenant identifiers/organization if the API supports it (e.g.Microsoft AD) Parameters Returns Supported Clients Sample |
Overview
Content Tools
Activity