improve: HTTP auth display logic and messaging (#4430)
* http-auth: Include unsupported scheme name in error message * http-auth: Treat authentication scheme case insensitively The spec refers to RFC 7235 for scheme names, and the RFC says names are matched case insensitively. * linter fixes
This commit is contained in:
@@ -53,7 +53,7 @@ export default class HttpAuth extends React.Component {
|
|||||||
const Markdown = getComponent( "Markdown" )
|
const Markdown = getComponent( "Markdown" )
|
||||||
const JumpToPath = getComponent("JumpToPath", true)
|
const JumpToPath = getComponent("JumpToPath", true)
|
||||||
|
|
||||||
const scheme = schema.get("scheme")
|
const scheme = (schema.get("scheme") || "").toLowerCase()
|
||||||
let value = this.getValue()
|
let value = this.getValue()
|
||||||
let errors = errSelectors.allErrors().filter( err => err.get("authId") === name)
|
let errors = errSelectors.allErrors().filter( err => err.get("authId") === name)
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ export default class HttpAuth extends React.Component {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
return <div>
|
return <div>
|
||||||
<em><b>{name}</b> HTTP authentication: unsupported or missing scheme</em>
|
<em><b>{name}</b> HTTP authentication: unsupported scheme {`'${scheme}'`}</em>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user