oauth
Use the oauth policy to policy to perform OAuth processing based on defined OAuth provider settings.
Gateway support
Gateway | Policy version |
---|---|
DataPower® API Gateway | 2.0.0 |
This topic describes how to configure the policy in your OpenAPI source; for details on how to configure the policy in the assembly user interface, see OAuth.
About
- oauth:
version: version
title: title
description: description
oauth-provider-settings-ref:
.
.
.
references_to_oauth_settings
.
.
.
supported-oauth-components:
- oauth_component_1
- oauth_component_2
.
.
.
- Editing the native OAuth provider configuration using the API Editor (Cloud Manager UI)
- Editing the native OAuth provider configuration using the API Editor (API Manager UI)
Properties
Property | Required | Description | Data type |
---|---|---|---|
version | Yes | The policy version number | string |
title | No | A title for the policy. | string |
description | No | A description of the policy. | string |
|
Yes | The name of an existing OAuth provider that defines the required settings. | string |
|
No | A URL to a document that contains serialized XML or JSON properties that defines OAuth token generate settings. URL reference takes precedence over any existing literal configuration or object reference. | string |
|
No | A literal string that contains serialized XML or JSON properties that defines OAuth token generate settings. Literal configuration takes precedence over any existing object reference. | string |
|
Yes | Specify the OAuth components that are supported by this policy, as follows:
|
string |
Overriding default OAuth provider settings
You can use either the literal
property or the url
property to dynamically override any OAuth provider configuration settings to dynamically override any OAuth provider configuration settings defined by the default
property.
<OAuthProviderSettings><APICAccessTokenTTL>200</APICAccessTokenTTL></OAuthProviderSettings>
For a list of all OAuth provider settings, refer to the OAuthProviderSettings
management schema, defined in the xml-mgmt.xsd file located in the
store: directory on the DataPower API Gateway.
If you are using the API Manager user interface, the connection details are determined by the API Manager URL that you open, and the user ID with which you log in. If you are using the API Designer user interface, you provide the management server details and user ID in the login window that opens when you first launch API Designer; see Logging into API Designer.
oauth policy example
- oauth:
version: 2.0.0
title: my-oauth-policy
oauth-provider-settings-ref:
default: my-oauth
supported-oauth-components:
- OAuthGenerateAZCode
- OAuthGenerateAccessToken
- OAuthIntrospectToken
- OAuthVerifyAZCode
- OAuthVerifyRefreshToken