Skip to content

Commit 904f182

Browse files
authored
Update Authorizations Spec (#21027)
* Update definitions.json Update wording for PostGetLoginLink endpoint description * Update apimauthorizationproviders.json Add 201 response to all Authorization PUT requests * Updated examples and fixed formatting There was a formatting issue within apimauthorizationproviders.json, and the Authorization examples needed to be updated with the new 201 responses for creating/updating Authorization entities. * Add long-running-operation key/value Added x-ms-long-running-operation: true to Authorization PUT requests * Remove long-running-operations
1 parent 318bfb1 commit 904f182

9 files changed

+170
-4
lines changed

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/apimauthorizationproviders.json

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,20 @@
193193
}
194194
],
195195
"responses": {
196+
"201": {
197+
"description": "Authorization provider was successfully created.",
198+
"schema": {
199+
"$ref": "./definitions.json#/definitions/AuthorizationProviderContract"
200+
},
201+
"headers": {
202+
"ETag": {
203+
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
204+
"type": "string"
205+
}
206+
}
207+
},
196208
"200": {
197-
"description": "Authorization provider was successfully updated.",
209+
"description": "The existing Authorization provider was successfully updated.",
198210
"schema": {
199211
"$ref": "./definitions.json#/definitions/AuthorizationProviderContract"
200212
},
@@ -425,8 +437,20 @@
425437
}
426438
],
427439
"responses": {
440+
"201": {
441+
"description": "Authorization was successfully created.",
442+
"schema": {
443+
"$ref": "./definitions.json#/definitions/AuthorizationContract"
444+
},
445+
"headers": {
446+
"ETag": {
447+
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
448+
"type": "string"
449+
}
450+
}
451+
},
428452
"200": {
429-
"description": "Authorization was successfully updated.",
453+
"description": "The existing Authorization was successfully updated.",
430454
"schema": {
431455
"$ref": "./definitions.json#/definitions/AuthorizationContract"
432456
},
@@ -726,8 +750,20 @@
726750
}
727751
],
728752
"responses": {
753+
"201": {
754+
"description": "Authorization access policy was successfully created.",
755+
"schema": {
756+
"$ref": "./definitions.json#/definitions/AuthorizationAccessPolicyContract"
757+
},
758+
"headers": {
759+
"ETag": {
760+
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
761+
"type": "string"
762+
}
763+
}
764+
},
729765
"200": {
730-
"description": "Authorization access policy was successfully updated.",
766+
"description": "The existing Authorization access policy was successfully updated.",
731767
"schema": {
732768
"$ref": "./definitions.json#/definitions/AuthorizationAccessPolicyContract"
733769
},

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/definitions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1330,7 +1330,7 @@
13301330
"properties": {
13311331
"postLoginRedirectUrl": {
13321332
"type": "string",
1333-
"description": "The post redirect URL after login is completed."
1333+
"description": "The redirect URL after login has completed."
13341334
}
13351335
},
13361336
"description": "Authorization login request contract."

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/examples/ApiManagementCreateAuthorizationAADAuthCode.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@
1414
}
1515
},
1616
"responses": {
17+
"201": {
18+
"body": {
19+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz2",
20+
"type": "Microsoft.ApiManagement/service/authorizationProviders/authorizations",
21+
"name": "authz2",
22+
"properties": {
23+
"authorizationType": "OAuth2",
24+
"oauth2grantType": "AuthorizationCode",
25+
"status": "Error",
26+
"error": {
27+
"code": "Unauthenticated",
28+
"message": "This connection is not authenticated."
29+
}
30+
}
31+
}
32+
},
1733
"200": {
1834
"body": {
1935
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz2",

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/examples/ApiManagementCreateAuthorizationAADClientCred.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@
1818
}
1919
},
2020
"responses": {
21+
"201": {
22+
"body": {
23+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithclientcred/authorizations/authz1",
24+
"type": "Microsoft.ApiManagement/service/authorizationProviders/authorizations",
25+
"name": "authz1",
26+
"properties": {
27+
"authorizationType": "OAuth2",
28+
"oauth2grantType": "ClientCredentials",
29+
"parameters": {
30+
"clientId": "53790925-fdd3-4b80-bc7a-4c3aaf25801d"
31+
},
32+
"status": "Connected"
33+
}
34+
}
35+
},
2136
"200": {
2237
"body": {
2338
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithclientcred/authorizations/authz1",

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/examples/ApiManagementCreateAuthorizationAccessPolicy.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@
1515
}
1616
},
1717
"responses": {
18+
"201": {
19+
"body": {
20+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz1/accesspolicies",
21+
"type": "Microsoft.ApiManagement/service/authorizationProviders/authorizations/accessPolicies",
22+
"name": "fe0bed83-631f-4149-bd0b-0464b1bc7cab",
23+
"properties": {
24+
"tenantId": "13932a0d-5c63-4d37-901d-1df9c97722ff",
25+
"objectId": "fe0bed83-631f-4149-bd0b-0464b1bc7cab"
26+
}
27+
}
28+
},
1829
"200": {
1930
"body": {
2031
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz1/accesspolicies",

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/examples/ApiManagementCreateAuthorizationProviderAADAuthCode.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,29 @@
2424
}
2525
},
2626
"responses": {
27+
"201": {
28+
"body": {
29+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode",
30+
"type": "Microsoft.ApiManagement/service/authorizationProviders",
31+
"name": "aadwithauthcode",
32+
"properties": {
33+
"displayName": "aadwithauthcode",
34+
"identityProvider": "aad",
35+
"oauth2": {
36+
"redirectUrl": "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
37+
"grantTypes": {
38+
"authorizationCode": {
39+
"clientId": "53790825-fdd3-4b80-bc7a-4c3aaf25801d",
40+
"scopes": "User.Read.All Group.Read.All",
41+
"loginUri": "https://login.windows.net",
42+
"resourceUri": "https://graph.microsoft.com",
43+
"tenantId": "common"
44+
}
45+
}
46+
}
47+
}
48+
}
49+
},
2750
"200": {
2851
"body": {
2952
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode",

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/examples/ApiManagementCreateAuthorizationProviderAADClientCred.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,28 @@
2222
}
2323
},
2424
"responses": {
25+
"201": {
26+
"body": {
27+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithclientcred",
28+
"type": "Microsoft.ApiManagement/service/authorizationProviders",
29+
"name": "aadwithclientcred",
30+
"properties": {
31+
"displayName": "aadwithclientcred",
32+
"identityProvider": "aad",
33+
"oauth2": {
34+
"redirectUrl": "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
35+
"grantTypes": {
36+
"clientCredentials": {
37+
"scopes": "User.Read.All Group.Read.All",
38+
"loginUri": "https://login.windows.net",
39+
"resourceUri": "https://graph.microsoft.com",
40+
"tenantId": "common"
41+
}
42+
}
43+
}
44+
}
45+
}
46+
},
2547
"200": {
2648
"body": {
2749
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithclientcred",

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/examples/ApiManagementCreateAuthorizationProviderGenericOAuth2.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,29 @@
2626
}
2727
},
2828
"responses": {
29+
"201": {
30+
"body": {
31+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/eventbrite",
32+
"type": "Microsoft.ApiManagement/service/authorizationProviders",
33+
"name": "eventbrite",
34+
"properties": {
35+
"displayName": "eventbrite",
36+
"identityProvider": "oauth2",
37+
"oauth2": {
38+
"redirectUrl": "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
39+
"grantTypes": {
40+
"authorizationCode": {
41+
"clientId": "ZYIJTBTABHOUQQDLZY",
42+
"scopes": null,
43+
"authorizationUrl": "https://www.eventbrite.com/oauth/authorize",
44+
"refreshUrl": "https://www.eventbrite.com/oauth/token",
45+
"tokenUrl": "https://www.eventbrite.com/oauth/token"
46+
}
47+
}
48+
}
49+
}
50+
}
51+
},
2952
"200": {
3053
"body": {
3154
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/eventbrite",

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2022-04-01-preview/examples/ApiManagementCreateAuthorizationProviderOOBGoogle.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,26 @@
2323
}
2424
},
2525
"responses": {
26+
"201": {
27+
"body": {
28+
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/google",
29+
"type": "Microsoft.ApiManagement/service/authorizationProviders",
30+
"name": "google",
31+
"properties": {
32+
"displayName": "google",
33+
"identityProvider": "google",
34+
"oauth2": {
35+
"redirectUrl": "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
36+
"grantTypes": {
37+
"authorizationCode": {
38+
"clientId": "508791967882-5qv6o2i99a75un7329vlegtk78kr766h.apps.googleusercontent.com",
39+
"scopes": "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email"
40+
}
41+
}
42+
}
43+
}
44+
}
45+
},
2646
"200": {
2747
"body": {
2848
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/google",

0 commit comments

Comments
 (0)