fix(authorization): include oauth endpoint description (#7195)

This commit is contained in:
Michael Zangl
2021-04-21 01:39:11 +02:00
committed by GitHub
parent f239965cbc
commit 5906dfae02
2 changed files with 6 additions and 3 deletions

View File

@@ -43,7 +43,8 @@ export const definitionsToAuthorize = onlyOAS3(createSelector(
authorizationUrl: flowVal.get("authorizationUrl"), authorizationUrl: flowVal.get("authorizationUrl"),
tokenUrl: flowVal.get("tokenUrl"), tokenUrl: flowVal.get("tokenUrl"),
scopes: flowVal.get("scopes"), scopes: flowVal.get("scopes"),
type: definition.get("type") type: definition.get("type"),
description: definition.get("description")
}) })
list = list.push(new Map({ list = list.push(new Map({

View File

@@ -21,6 +21,7 @@ describe("oas3 plugin - auth extensions - wrapSelectors", function(){
return fromJS({ return fromJS({
"oauth2AuthorizationCode": { "oauth2AuthorizationCode": {
"type": "oauth2", "type": "oauth2",
"description": "Some Oauth2 endpoint",
"flows": { "flows": {
"authorizationCode": { "authorizationCode": {
"authorizationUrl": "http://google.com/", "authorizationUrl": "http://google.com/",
@@ -105,7 +106,8 @@ describe("oas3 plugin - auth extensions - wrapSelectors", function(){
scopes: { scopes: {
"myScope": "our only scope" "myScope": "our only scope"
}, },
type: "oauth2" type: "oauth2",
description: "Some Oauth2 endpoint"
} }
}, },
{ {
@@ -201,7 +203,7 @@ describe("oas3 plugin - auth extensions - wrapSelectors", function(){
// OPTIONAL. JSON array containing a list of the OAuth 2.0 Grant Type values that // OPTIONAL. JSON array containing a list of the OAuth 2.0 Grant Type values that
// this OP supports. Dynamic OpenID Providers MUST support the authorization_code // this OP supports. Dynamic OpenID Providers MUST support the authorization_code
// and implicit Grant Type values and MAY support other Grant Types. If omitted, // and implicit Grant Type values and MAY support other Grant Types. If omitted,
// the default value is ["authorization_code", "implicit"]. // the default value is ["authorization_code", "implicit"].
oidcNoGrant: { oidcNoGrant: {
flow: "authorization_code", flow: "authorization_code",
authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth", authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth",