FUNCTION Init(
cnx_timeout INTEGER,
client_id STRING,
client_secret STRING )
RETURNS BOOLEAN
|
To be called in a Genero application accessing a secure RESTful web
service started behind a Genero Application Server. |
FUNCTION InitService(
cnx_timeout INTEGER,
access_token STRING )
RETURNS BOOLEAN
|
To be called in a Genero web service started via OpenID Connect/OAuth2
accessing another secure RESTful web service as a client. |
FUNCTION InitNativeApp(
cnx_timeout INTEGER,
tokens OpenIdCResponseType,
client_id STRING,
client_secret STRING,
token_end_point STRING)
RETURNS BOOLEAN
|
To be called in a Genero application accessing a secure RESTful web
service directly (not behind a Genero Application Server). |
FUNCTION GetOpenIDMetadata()
RETURNS OAuthAPI.OpenIDMetadataType
|
Get metadata from the Identity Provider for a service running on a
Genero Application Server (GAS). |
FUNCTION GetIDPIssuer()
RETURNS STRING
|
Get endpoint of the Identity Provider. |
FUNCTION GetIdRoles()
RETURNS DYNAMIC ARRAY OF STRING
|
Get OAuth ID Token authorization roles. |
FUNCTION GetIDScopes()
RETURNS DYNAMIC ARRAY OF STRING
|
Get OAuth ID Token authorization scopes. |
FUNCTION GetIDSubject()
RETURNS STRING
|
Get OAuth subject identifier of ID Token. |
FUNCTION GetMyAccessToken()
RETURNS STRING
|
Get a valid access token. |
FUNCTION CreateHTTPAuthorizationRequest(
url STRING )
RETURNS com.HttpRequest
|
Create an HttpRequest with OAuth access token. |
FUNCTION RetryHTTPRequest(
resp com.HttpResponse )
RETURNS BOOLEAN
|
Retry an HttpRequest with OAuth access token to check if the access
token has expired. |
FUNCTION ExtractTokenFromHTTPRequest(
req com.HttpServiceRequest)
RETURNS STRING
|
Return the OAuth access token from a HTTP request service
object. |
FUNCTION FetchOpenIDMetadata(
timeout INTEGER,
idp STRING )
RETURNS OAuthAPI.OpenIDMetadataType
|
Fetch metadata from the Identity Provider at the URL
provided. |
FUNCTION RetrievePasswordToken(
timeout INTEGER,
TokenServiceURL STRING,
usr STRING,
pass STRING,
scope STRING )
RETURNS ( STRING, INTEGER )
|
Return the OAuth service access token via user name and
password. |
FUNCTION RetrievePasswordTokenForNativeApp(
timeout INTEGER,
TokenServiceURL STRING,
username STRING,
password STRING,
client_id STRING,
client_secret STRING,
scope STRING)
RETURNS OpenIdCResponseType
|
Returns the OAuth service access token via user credentials
(username/password) and client credentials (client_id/secret_id). A refresh token allows the access
token to be refreshed when it expires. |
FUNCTION RetrieveServiceToken(
timeout INTEGER,
TokenServiceURL STRING,
client_id STRING,
secret_id STRING,
scope STRING )
RETURNS STRING, INTEGER
|
Return the OAuth service access token via client app
credentials. |