Child pages
  • OAuthService

Versions Compared

Key

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

sWordListWebClientsWordListservoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientNGClient

servoy sSummary12%30%58%height: 30px;3Methods SummaryCreate a DELETE request.Create a GET request for a resource.Create a POST request.Create a PUT request.Creates a JSOAuthRequest for with the enum of RequestType (GET, PUT, DELETE, etc) for a resource url.This is quick method by executing a GET request and returning right away the OAuthResponse So it would be the same as executeRequest(createRequest(RequestType.Method to execute requests that are made, and configured by #createRequest(Verb,String)Returns the number of seconds left until the access token expires.Get the access token currently set on the service.Return the token lifetime in seconds.Return the refresh token.Checks if the access token is expired.Obtains a new access token if the OAuth api supports it.voidConfigure the oauth service with an access token using the scope that was initially set when creating the service.voidConfigure the oauth service with an access token for the specified scope.

functionservoy sDetail2100%height:30px2Methods DetailscreateDeleteRequestname

createDeleteRequest(resourceURL)

dessIndent
Create a DELETE request.
prs

Parameters

sIndentresourceURLthe url of the resource to be deleted
ret

Returns

sIndent
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
createGetRequestname

createGetRequest(resourceURL)

dessIndent
Create a GET request for a resource.
prs

Parameters

sIndentresourceURLthe url of the resource which you want to get
ret

Returns

sIndent
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
createPostRequestname

createPostRequest(resourceURL)

dessIndent
Create a POST request.
prs

Parameters

sIndentresourceURLthe url where the enclosed entity will be stored
ret

Returns

sIndent
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
createPutRequestname

createPutRequest(resourceURL)

dessIndent
Create a PUT request.
prs

Parameters

sIndentresourceURLthe url where the enclosed entity will be stored
ret

Returns

sIndent
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
createRequestname

createRequest(requestType, resourceURL)

dessIndent
Creates a JSOAuthRequest for with the enum of RequestType (GET, PUT, DELETE, etc) for a resource url.
prs

Parameters

sIndentrequestTypeone of the types of plugins.oauth.RequestTyperesourceURLthe url of the resource you want to access
ret

Returns

sIndent
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
executeGetRequestname

executeGetRequest(resourceURL)

dessIndent
This is quick method by executing a GET request and returning right away the OAuthResponse
So it would be the same as executeRequest(createRequest(RequestType.GET, url))
prs

Parameters

sIndentresourceURL ;
ret

Returns

sIndent
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
executeRequestname

executeRequest(request)

dessIndent
Method to execute requests that are made, and configured by  #createRequest(Verb,String)
prs

Parameters

sIndentrequestthe JSOAuthRequest object that was created by #createRequest(Verb,String)
ret

Returns

sIndent
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
getAccessExpiresInname

getAccessExpiresIn()

dessIndent
Returns the number of seconds left until the access token expires.
ret

Returns

sIndent
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
getAccessTokenname

getAccessToken()

dessIndent
Get the access token currently set on the service.
ret

Returns

sIndent
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
getAccessTokenLifetimename

getAccessTokenLifetime()

dessIndent
Return the token lifetime in seconds.
ret

Returns

sIndent
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
getAuthorizationURLname

getAuthorizationURL()

dessIndentret

Returns

sIndent
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
getRefreshTokenname

getRefreshToken()

dessIndent
Return the refresh token.
ret

Returns

sIndent
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
isAccessTokenExpiredname

isAccessTokenExpired()

dessIndent
Checks if the access token is expired.
ret

Returns

sIndent
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
refreshTokenname

refreshToken()

dessIndent
Obtains a new access token if the OAuth api supports it.
ret

Returns

sIndent
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
setAccessTokenname

setAccessToken(code)

dessIndent
Configure the oauth service with an access token using the scope that was initially set when creating the service.
prs

Parameters

sIndentcodethe authorization code used to request and access token
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow
setAccessTokenname

setAccessToken(code, scope)

dessIndent
Configure the oauth service with an access token for the specified scope.
prs

Parameters

sIndentcodethe authorization code used to request an access tokenscopethe scope for which to obtain an access token
clients

Supported Clients

sIndent
SmartClient,WebClient,NGClientsam

Sample

sIdentjavascript
lastDetailRow