Skip to content

Commit

Permalink
Update Authorizations Spec (#21027)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
LFZ96 authored Oct 10, 2022
1 parent 318bfb1 commit 904f182
Show file tree
Hide file tree
Showing 9 changed files with 170 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,20 @@
}
],
"responses": {
"201": {
"description": "Authorization provider was successfully created.",
"schema": {
"$ref": "./definitions.json#/definitions/AuthorizationProviderContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"200": {
"description": "Authorization provider was successfully updated.",
"description": "The existing Authorization provider was successfully updated.",
"schema": {
"$ref": "./definitions.json#/definitions/AuthorizationProviderContract"
},
Expand Down Expand Up @@ -425,8 +437,20 @@
}
],
"responses": {
"201": {
"description": "Authorization was successfully created.",
"schema": {
"$ref": "./definitions.json#/definitions/AuthorizationContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"200": {
"description": "Authorization was successfully updated.",
"description": "The existing Authorization was successfully updated.",
"schema": {
"$ref": "./definitions.json#/definitions/AuthorizationContract"
},
Expand Down Expand Up @@ -726,8 +750,20 @@
}
],
"responses": {
"201": {
"description": "Authorization access policy was successfully created.",
"schema": {
"$ref": "./definitions.json#/definitions/AuthorizationAccessPolicyContract"
},
"headers": {
"ETag": {
"description": "Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.",
"type": "string"
}
}
},
"200": {
"description": "Authorization access policy was successfully updated.",
"description": "The existing Authorization access policy was successfully updated.",
"schema": {
"$ref": "./definitions.json#/definitions/AuthorizationAccessPolicyContract"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1330,7 +1330,7 @@
"properties": {
"postLoginRedirectUrl": {
"type": "string",
"description": "The post redirect URL after login is completed."
"description": "The redirect URL after login has completed."
}
},
"description": "Authorization login request contract."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz2",
"type": "Microsoft.ApiManagement/service/authorizationProviders/authorizations",
"name": "authz2",
"properties": {
"authorizationType": "OAuth2",
"oauth2grantType": "AuthorizationCode",
"status": "Error",
"error": {
"code": "Unauthenticated",
"message": "This connection is not authenticated."
}
}
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithclientcred/authorizations/authz1",
"type": "Microsoft.ApiManagement/service/authorizationProviders/authorizations",
"name": "authz1",
"properties": {
"authorizationType": "OAuth2",
"oauth2grantType": "ClientCredentials",
"parameters": {
"clientId": "53790925-fdd3-4b80-bc7a-4c3aaf25801d"
},
"status": "Connected"
}
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithclientcred/authorizations/authz1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz1/accesspolicies",
"type": "Microsoft.ApiManagement/service/authorizationProviders/authorizations/accessPolicies",
"name": "fe0bed83-631f-4149-bd0b-0464b1bc7cab",
"properties": {
"tenantId": "13932a0d-5c63-4d37-901d-1df9c97722ff",
"objectId": "fe0bed83-631f-4149-bd0b-0464b1bc7cab"
}
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode/authorizations/authz1/accesspolicies",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,29 @@
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode",
"type": "Microsoft.ApiManagement/service/authorizationProviders",
"name": "aadwithauthcode",
"properties": {
"displayName": "aadwithauthcode",
"identityProvider": "aad",
"oauth2": {
"redirectUrl": "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
"grantTypes": {
"authorizationCode": {
"clientId": "53790825-fdd3-4b80-bc7a-4c3aaf25801d",
"scopes": "User.Read.All Group.Read.All",
"loginUri": "https://login.windows.net",
"resourceUri": "https://graph.microsoft.com",
"tenantId": "common"
}
}
}
}
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithauthcode",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,28 @@
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithclientcred",
"type": "Microsoft.ApiManagement/service/authorizationProviders",
"name": "aadwithclientcred",
"properties": {
"displayName": "aadwithclientcred",
"identityProvider": "aad",
"oauth2": {
"redirectUrl": "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
"grantTypes": {
"clientCredentials": {
"scopes": "User.Read.All Group.Read.All",
"loginUri": "https://login.windows.net",
"resourceUri": "https://graph.microsoft.com",
"tenantId": "common"
}
}
}
}
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/aadwithclientcred",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,29 @@
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/eventbrite",
"type": "Microsoft.ApiManagement/service/authorizationProviders",
"name": "eventbrite",
"properties": {
"displayName": "eventbrite",
"identityProvider": "oauth2",
"oauth2": {
"redirectUrl": "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
"grantTypes": {
"authorizationCode": {
"clientId": "ZYIJTBTABHOUQQDLZY",
"scopes": null,
"authorizationUrl": "https://www.eventbrite.com/oauth/authorize",
"refreshUrl": "https://www.eventbrite.com/oauth/token",
"tokenUrl": "https://www.eventbrite.com/oauth/token"
}
}
}
}
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/eventbrite",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/google",
"type": "Microsoft.ApiManagement/service/authorizationProviders",
"name": "google",
"properties": {
"displayName": "google",
"identityProvider": "google",
"oauth2": {
"redirectUrl": "https://authorization-manager.consent.azure-apim.net/redirect/apim/apimService1",
"grantTypes": {
"authorizationCode": {
"clientId": "508791967882-5qv6o2i99a75un7329vlegtk78kr766h.apps.googleusercontent.com",
"scopes": "openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email"
}
}
}
}
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/authorizationProviders/google",
Expand Down

0 comments on commit 904f182

Please sign in to comment.