Skip to content

Commit

Permalink
Add ConfirmConsentCode to APIM RP (#22418)
Browse files Browse the repository at this point in the history
* Update apimauthorizationproviders.json

Add ConfirmConsentCode endpoint

* Update definitions.json

* Create ApiManagementPostAuthorizationConfirmConsentCodeRequest.json

* Update definitions.json

Remove count property

* Update apimauthorizationproviders.json
  • Loading branch information
LFZ96 authored Feb 7, 2023
1 parent af12c7f commit d27cd75
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,66 @@
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/confirmConsentCode": {
"post": {
"tags": [
"AuthorizationConfirmConsentCode"
],
"operationId": "Authorization_ConfirmConsentCode",
"description": "Confirm valid consent code to suppress Authorizations anti-phishing page.",
"x-ms-examples": {
"ApiManagementPostAuthorizationConfirmConsentCodeRequest": {
"$ref": "./examples/ApiManagementPostAuthorizationConfirmConsentCodeRequest.json"
}
},
"parameters": [
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
},
{
"$ref": "./apimanagement.json#/parameters/AuthorizationProviderIdParameter"
},
{
"$ref": "./apimanagement.json#/parameters/AuthorizationIdParameter"
},
{
"name": "parameters",
"in": "body",
"required": true,
"schema": {
"$ref": "./definitions.json#/definitions/AuthorizationConfirmConsentCodeRequestContract"
},
"description": "Create parameters."
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
},
{
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "The response body is empty.",
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
}
}
}
}
},
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/authorizationProviders/{authorizationProviderId}/authorizations/{authorizationId}/accessPolicies": {
"get": {
"tags": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1382,6 +1382,16 @@
},
"description": "Authorization login response contract."
},
"AuthorizationConfirmConsentCodeRequestContract": {
"type": "object",
"properties": {
"consentCode": {
"type": "string",
"description": "The consent code from the authorization server after authorizing and consenting."
}
},
"description": "Authorization confirm consent code request contract."
},
"AuthorizationProviderCollection": {
"type": "object",
"properties": {
Expand All @@ -1392,11 +1402,6 @@
},
"description": "Page values."
},
"count": {
"type": "integer",
"format": "int64",
"description": "Total record count number across all pages."
},
"nextLink": {
"type": "string",
"description": "Next page link if any."
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"serviceName": "apimService1",
"resourceGroupName": "rg1",
"api-version": "2022-08-01",
"subscriptionId": "subid",
"authorizationProviderId": "aadwithauthcode",
"authorizationId": "authz1",
"parameters": {
"consentCode": "theconsentcode"
}
},
"responses": {
"200": {}
}
}

0 comments on commit d27cd75

Please sign in to comment.