Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListNGClient

servoy sSummary12%30%58%height: 30px;3Methods SummaryCreate a custom OAuth api builder.Creates an OAuth service that can be used to obtain an access token and access protected data.Help method to get the redirect URL which needs to be configured on the OAuth provider application page.Creates an OAuth service configurator.

functionservoy sDetail2100%height:30px2Methods DetailscustomApiname

customApi(authorizationBaseUrl, accessTokenEndpoint)

dessIndent
Create a custom OAuth api builder.
prs

Parameters

sIndentauthorizationBaseUrlthe base URL where you should redirect your users to authenticate your applicationaccessTokenEndpointthe URL that receives the access token requests
ret

Returns

sIndent
clients

Supported Clients

sIndentNGClient
sam

Sample

sIdentjavascript
lastDetailRowgetOAuthServicename

getOAuthService(provider, clientId, clientSecret, scope, state, deeplinkmethod)

dessIndent
Creates an OAuth service that can be used to obtain an access token and access protected data.
This method will be deprecated in the following versions, the preferred way is plugins.oauth.serviceBuilder with a callback function.
prs

Parameters

sIndentprovideran OAuth provider id, see plugins.oauth.OAuthProvidersclientIdyour app idclientSecretyour client secretscopeconfigures the OAuth scope. This is only necessary in some APIs (like Microsoft's).stateconfigures the anti forgery session state. This is available in some APIs (like Facebook's).deeplinkmethodthe name of a global method, which will get the code returned by the OAuth provider
ret

Returns

sIndent the OAuthService.
clients

Supported Clients

sIndentNGClient
sam

Sample

sIdentjavascript
lastDetailRow
getUsedRedirectUrlname

getUsedRedirectUrl(builder)

dessIndent
Help method to get the redirect URL which needs to be configured on the OAuth provider application page.
The url is computed based on what is set on the service builder: deeplink method name, response mode and response type.
prs

Parameters

sIndentbuilderan OAuth service builder
ret

Returns

sIndent the redirect url
clients

Supported Clients

sIndentNGClient
sam

Sample

sIdentjavascript
lastDetailRow
serviceBuildername

serviceBuilder(clientID)

dessIndent
Creates an OAuth service configurator.
prs

Parameters

sIndentclientID ;
ret

Returns

sIndent an OAuth service builder object
clients

Supported Clients

sIndentNGClient
sam

Sample

sIdentjavascript
lastDetailRow