spec/actions.js: Add OIDC metadata fetching components/auth/oauth2: Add OIDC URL to the Authorization popup
This commit is contained in:
@@ -122,11 +122,13 @@ export default class Oauth2 extends React.Component {
|
||||
|
||||
const { isOAS3 } = specSelectors
|
||||
|
||||
let oidcUrl = isOAS3() ? schema.get("openIdConnectUrl") : null
|
||||
|
||||
// Auth type consts
|
||||
const IMPLICIT = "implicit"
|
||||
const PASSWORD = "password"
|
||||
const ACCESS_CODE = isOAS3() ? "authorizationCode" : "accessCode"
|
||||
const APPLICATION = isOAS3() ? "clientCredentials" : "application"
|
||||
const ACCESS_CODE = isOAS3() ? (oidcUrl ? "authorization_code" : "authorizationCode") : "accessCode"
|
||||
const APPLICATION = isOAS3() ? (oidcUrl ? "client_credentials" : "clientCredentials") : "application"
|
||||
|
||||
let flow = schema.get("flow")
|
||||
let scopes = schema.get("allowedScopes") || schema.get("scopes")
|
||||
@@ -144,6 +146,7 @@ export default class Oauth2 extends React.Component {
|
||||
|
||||
{ isAuthorized && <h6>Authorized</h6> }
|
||||
|
||||
{ oidcUrl && <p>OpenID Connect URL: <code>{ oidcUrl }</code></p> }
|
||||
{ ( flow === IMPLICIT || flow === ACCESS_CODE ) && <p>Authorization URL: <code>{ schema.get("authorizationUrl") }</code></p> }
|
||||
{ ( flow === PASSWORD || flow === ACCESS_CODE || flow === APPLICATION ) && <p>Token URL:<code> { schema.get("tokenUrl") }</code></p> }
|
||||
<p className="flow">Flow: <code>{ schema.get("flow") }</code></p>
|
||||
|
||||
Reference in New Issue
Block a user