You're viewing Apigee Edge documentation.
Go to the
Apigee X documentation. info

What
Deletes the specified OAuth V2 authorization code or access token.
Samples
Delete Access Token
Below is an example policy used to delete an OAuth 2.0 access token. The example below
locates the access token to delete on the request message by looking for a header called
access_token
.
<DeleteOAuthV2Info name="DeleteAccessToken"> <AccessToken ref="request.header.access_token"></AccessToken> </DeleteOAuthV2Info>
Below is an example policy used to delete an OAuth 2.0 authorization code. The example
below locates the auth code to delete on the request message by looking for a query parameter
called code
.
<DeleteOAuthV2Info name="DeleteAuthCode"> <AuthorizationCode ref="request.queryparam.code"></AuthorizationCode> </DeleteOAuthV2Info>
Element Reference
The element reference describes the elements and attributes of the DeleteOAuthV2Info policy.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <DeleteOAuthV2Info async="false" continueOnError="false" enabled="true" name="DeleteOAuthV2Info-1"> <DisplayName>Delete OAuth v2.0 Info 1</DisplayName> <AccessToken ref={some-variable}></AccessToken> <!--<AuthorizationCode ref={some-variable}></AuthorizationCode>--> <Attributes/> </DeleteOAuthV2Info
<DeleteOAuthV2Info> attributes
<DeleteOAuthV2Info async="false" continueOnError="false" enabled="true" name="Delete-OAuth-v20-Info-1">
Attribute | Description | Default | Presence |
---|---|---|---|
async |
Set to This setting is only used for internal optimization. |
false | Optional |
continueOnError |
Most policies are expected to return an error when a failure occurs. By setting this
attribute to |
false | Optional |
enabled | Determines whether a policy is enforced or not. If set to false , a
policy is 'turned off', and not enforced (even though the policy remains attached to a
Flow). |
true | Optional |
name |
The internal name of the policy. This name is referenced in Step elements to attach the policy to a Flow. Note: Characters you can use in the name are restricted to:
|
N/A | Required |
<AccessToken> element
Identifies the variable where the access token to delete is located. For example, if the
access token is attached to request message as a query parameter called "access_token", specify
request.queryparam.access_token
. You can use any valid variable that references the
token. Or, could pass in the literal token string (rare case).
<AccessToken ref="request.queryparam.access_token"></AccessToken>
Default: | N/A |
Presence: | Either <AccessToken> or <AuthorizationCode> is
required. |
Type: | String |
Attributes
Attribute | Description | Default | Presence |
---|---|---|---|
ref |
An access token variable. Typically, retrieved from a flow variable. For
example: |
N/A | Optional |
<AuthorizationCode> element
Identifies the variable where the authorization code to delete is located. For example, if the
auth code is attached to request message as a query parameter called "code", specify
request.queryparam.code
. You can use any valid variable that references the token.
Or, could pass in the literal token string (rare case).
<AccessToken ref="request.queryparam.access_token"></AccessToken>
Default: | N/A |
Presence: | Either <AccessToken> or <AuthorizationCode> is
required. |
Type: | String |
Attributes
Attribute | Description | Default | Presence |
---|---|---|---|
ref |
An access token variable. Typically, retrieved from a flow variable. For
example: |
N/A | Optional |
<DisplayName> element
A natural-language name that labels the policy in the management UI proxy editor. If omitted, the policy name attribute is used.
<DisplayName>DeleteOAuthV2Info 1</DisplayName>
Default: | The value of the policy's name attribute. |
Presence: | Optional |
Type: | String |
Output
On success, the policy returns a 200 status.
On failure, the policy returns 404 and output similar to the following (depending on whether you are deleting an access token or an auth code):
HTTP/1.1 404 Not Found Content-Type: application/json Content-Length: 144 Connection: keep-alive {"fault":{"faultstring":"Invalid Authorization Code","detail":{"errorcode":"keymanagement.service.invalid_request-authorization_code_invalid"}}}
Schema
Each policy type is defined by an XML schema (.xsd
). For reference, policy schemas
are available on GitHub.