43.16 OAUTH_AUTHENTICATE Procedure Signature 1
This procedure performs OAUTH autentication and requests an OAuth access token. The
token and its expiry date are stored in the global variable
g_oauth_token
.
type oauth_token is record(
token varchar2(255),
expires date );
Note:
Currently only the Client Credentials flow is supported.
Syntax
APEX_WEB_SERVICE.OAUTH_AUTHENTICATE(
p_token_url IN VARCHAR2,
p_client_id IN VARCHAR2,
p_client_secret IN VARCHAR2,
p_flow_type IN VARCHAR2 DEFAULT OAUTH_CLIENT_CRED,
p_proxy_override IN VARCHAR2 DEFAULT NULL,
p_transfer_timeout IN NUMBER DEFAULT 180,
p_wallet_path IN VARCHAR2 DEFAULT NULL,
p_wallet_pwd IN VARCHAR2 DEFAULT NULL,
p_https_host IN VARCHAR2 DEFAULT NULL,
p_scope IN VARCHAR2 DEFAULT NULL );
Parameters
Table 43-10 OAUTH_AUTHENTICATE Procedure Parameters
Parameter | Description |
---|---|
|
The url endpoint of the OAuth token service. |
|
OAuth Client ID to use for authentication. |
|
OAuth Client Secret to use for authentication. |
|
OAuth flow type - only |
|
The proxy to use for the request. |
|
The amount of time in seconds to wait for a response. |
|
The filesystem path to a wallet if request is https. For example, |
|
The password to access the wallet. |
|
The host name to be matched against the common name (CN) of the remote server's certificate for an HTTPS request. |
|
The OAuth scope to identify groups of attributes that
will be requested from the OAuth provider. For example,
|
Example
begin
apex_web_service.oauth_authenticate(
p_token_url => '[URL to ORDS OAuth troken service: http(s)://{host}:{port}/ords/.../oauth/token]',
p_client_id => '[client-id]',
p_client_secret => '[client-secret]');
end;
Parent topic: APEX_WEB_SERVICE