Skip to content

Commit

Permalink
APIM Open ID Connect providers (#20622)
Browse files Browse the repository at this point in the history
* APIM Open ID Connect providers

* added new proeprties for update

* prettier
  • Loading branch information
malincrist authored Sep 16, 2022
1 parent 9cccce8 commit a282e02
Show file tree
Hide file tree
Showing 7 changed files with 168 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@
"ApiManagementCreateApiWithMultipleAuthServers": {
"$ref": "./examples/ApiManagementCreateApiWithMultipleAuthServers.json"
},
"ApiManagementCreateApiWithMultipleOpenIdConnectProviders": {
"$ref": "./examples/ApiManagementCreateApiWithMultipleOpenIdConnectProviders.json"
},
"ApiManagementCreateWebSocketApi": {
"$ref": "./examples/ApiManagementCreateWebsocketApi.json"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,16 @@
"authorizationServerId"
],
"description": "Collection of OAuth2 authentication settings included into this API."
},
"openidAuthenticationSettings": {
"type": "array",
"items": {
"$ref": "#/definitions/OpenIdAuthenticationSettingsContract"
},
"x-ms-identifiers": [
"openidProviderId"
],
"description": "Collection of Open ID Connect authentication settings included into this API."
}
},
"description": "API Authentication Settings."
Expand Down Expand Up @@ -3746,6 +3756,14 @@
"x-ms-secret": true,
"type": "string",
"description": "Client Secret of developer console which is the client application."
},
"useInTestConsole": {
"type": "boolean",
"description": "If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided."
},
"useInApiDocumentation": {
"type": "boolean",
"description": "If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided."
}
},
"required": [
Expand Down Expand Up @@ -3788,6 +3806,14 @@
"x-ms-secret": true,
"type": "string",
"description": "Client Secret of developer console which is the client application."
},
"useInTestConsole": {
"type": "boolean",
"description": "If true, the Open ID Connect provider may be used in the developer portal test console. True by default if no value is provided."
},
"useInApiDocumentation": {
"type": "boolean",
"description": "If true, the Open ID Connect provider will be used in the API documentation in the developer portal. False by default if no value is provided."
}
},
"description": "Parameters supplied to the Update OpenID Connect Provider operation."
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
{
"parameters": {
"serviceName": "apimService1",
"resourceGroupName": "rg1",
"api-version": "2022-04-01-preview",
"subscriptionId": "subid",
"apiId": "tempgroup",
"parameters": {
"properties": {
"description": "apidescription5200",
"authenticationSettings": {
"openidAuthenticationSettings": [
{
"openidProviderId": "openidProviderId2283",
"bearerTokenSendingMethods": [
"authorizationHeader"
]
},
{
"openidProviderId": "openidProviderId2284",
"bearerTokenSendingMethods": [
"authorizationHeader"
]
}
]
},
"subscriptionKeyParameterNames": {
"header": "header4520",
"query": "query3037"
},
"displayName": "apiname1463",
"serviceUrl": "http://newechoapi.cloudapp.net/api",
"path": "newapiPath",
"protocols": [
"https",
"http"
]
}
}
},
"responses": {
"201": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419",
"type": "Microsoft.ApiManagement/service/apis",
"name": "apiid9419",
"properties": {
"displayName": "apiname1463",
"apiRevision": "1",
"description": "apidescription5200",
"serviceUrl": "http://newechoapi.cloudapp.net/api",
"path": "newapiPath",
"protocols": [
"http",
"https"
],
"subscriptionKeyParameterNames": {
"header": "header4520",
"query": "query3037"
},
"isCurrent": true,
"isOnline": true
}
}
},
"202": {
"headers": {
"location": "https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/tempgroup?api-version=2022-04-01-preview&asyncId=5c730e343244df1b9cb56e85&asyncCode=201"
}
},
"200": {
"body": {
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/apis/apiid9419",
"type": "Microsoft.ApiManagement/service/apis",
"name": "apiid9419",
"properties": {
"displayName": "apiname1463",
"apiRevision": "1",
"description": "apidescription5200",
"serviceUrl": "http://newechoapi.cloudapp.net/api",
"path": "newapiPath",
"protocols": [
"http",
"https"
],
"authenticationSettings": {
"openid": {
"openidProviderId": "openidProviderId2283",
"bearerTokenSendingMethods": [
"authorizationHeader"
]
},
"openidAuthenticationSettings": [
{
"openidProviderId": "openidProviderId2283",
"bearerTokenSendingMethods": [
"authorizationHeader"
]
},
{
"openidProviderId": "openidProviderId2284",
"bearerTokenSendingMethods": [
"authorizationHeader"
]
}
]
},
"subscriptionKeyParameterNames": {
"header": "header4520",
"query": "query3037"
},
"isCurrent": true,
"isOnline": true
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"displayName": "templateoidprovider3",
"metadataEndpoint": "https://oidprovider-template3.net",
"clientId": "oidprovidertemplate3",
"clientSecret": "x"
"clientSecret": "x",
"useInTestConsole": false,
"useInApiDocumentation": true
}
}
},
Expand All @@ -23,7 +25,9 @@
"properties": {
"displayName": "templateoidprovider3",
"metadataEndpoint": "https://oidprovider-template3.net",
"clientId": "oidprovidertemplate3"
"clientId": "oidprovidertemplate3",
"useInTestConsole": false,
"useInApiDocumentation": true
}
}
},
Expand All @@ -35,7 +39,9 @@
"properties": {
"displayName": "templateoidprovider3",
"metadataEndpoint": "https://oidprovider-template3.net",
"clientId": "oidprovidertemplate3"
"clientId": "oidprovidertemplate3",
"useInTestConsole": false,
"useInApiDocumentation": true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
"displayName": "templateoidprovider2",
"description": "open id provider template2",
"metadataEndpoint": "https://oidprovider-template2.net",
"clientId": "oidprovidertemplate2"
"clientId": "oidprovidertemplate2",
"useInTestConsole": false,
"useInApiDocumentation": true
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"displayName": "templateoidprovider2",
"description": "open id provider template2",
"metadataEndpoint": "https://oidprovider-template2.net",
"clientId": "oidprovidertemplate2"
"clientId": "oidprovidertemplate2",
"useInTestConsole": false,
"useInApiDocumentation": true
}
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
"If-Match": "*",
"parameters": {
"properties": {
"clientSecret": "updatedsecret"
"clientSecret": "updatedsecret",
"useInTestConsole": false,
"useInApiDocumentation": true
}
}
},
Expand All @@ -22,7 +24,9 @@
"displayName": "templateoidprovider2",
"description": "open id provider template2",
"metadataEndpoint": "https://oidprovider-template2.net",
"clientId": "oidprovidertemplate2"
"clientId": "oidprovidertemplate2",
"useInTestConsole": false,
"useInApiDocumentation": true
}
}
}
Expand Down

0 comments on commit a282e02

Please sign in to comment.