提交 3f6e21e3 编写于 作者: V Ville Skyttä 提交者: kyle

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
上级 26d0ad76
......@@ -53,7 +53,7 @@ export default class HttpAuth extends React.Component {
const Markdown = getComponent( "Markdown" )
const JumpToPath = getComponent("JumpToPath", true)
const scheme = schema.get("scheme")
const scheme = (schema.get("scheme") || "").toLowerCase()
let value = this.getValue()
let errors = errSelectors.allErrors().filter( err => err.get("authId") === name)
......@@ -125,7 +125,7 @@ export default class HttpAuth extends React.Component {
)
}
return <div>
<em><b>{name}</b> HTTP authentication: unsupported or missing scheme</em>
<em><b>{name}</b> HTTP authentication: unsupported scheme {`'${scheme}'`}</em>
</div>
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册