mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 20:47:01 +01:00
add logging for oauth2 errors (#620)
This commit is contained in:
parent
fad0dd86e0
commit
b7837f3aae
|
@ -188,13 +188,15 @@ or with an appropriate include.
|
||||||
OIDCRedirectURI http://resource.example.com/protected/redirect_uri
|
OIDCRedirectURI http://resource.example.com/protected/redirect_uri
|
||||||
OIDCCryptoPassphrase <random password here>
|
OIDCCryptoPassphrase <random password here>
|
||||||
OIDCProviderMetadataURL https://kanidm.example.com/oauth2/openid/<resource server name>/.well-known/openid-configuration
|
OIDCProviderMetadataURL https://kanidm.example.com/oauth2/openid/<resource server name>/.well-known/openid-configuration
|
||||||
OIDCScope "openid other_scopes"
|
OIDCScope "openid"
|
||||||
OIDCUserInfoTokenMethod authz_header
|
OIDCUserInfoTokenMethod authz_header
|
||||||
OIDCClientID <resource server name>
|
OIDCClientID <resource server name>
|
||||||
OIDCClientSecret <resource server password>
|
OIDCClientSecret <resource server password>
|
||||||
OIDCPKCEMethod S256
|
OIDCPKCEMethod S256
|
||||||
OIDCCookieSameSite On
|
OIDCCookieSameSite On
|
||||||
|
|
||||||
|
Other scopes can be added as required to the `OIDCScope` line, eg: `OIDCScope "openid scope2 scope3"`
|
||||||
|
|
||||||
In the virtual host, to protect a location:
|
In the virtual host, to protect a location:
|
||||||
|
|
||||||
<Location />
|
<Location />
|
||||||
|
|
|
@ -241,6 +241,11 @@ async fn oauth2_authorise(
|
||||||
Ok(tide::Response::new(tide::StatusCode::Unauthorized))
|
Ok(tide::Response::new(tide::StatusCode::Unauthorized))
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
|
admin_error!(
|
||||||
|
"Unable to authorise - Error ID: {} error: {}",
|
||||||
|
&hvalue,
|
||||||
|
&e.to_string()
|
||||||
|
);
|
||||||
redir_url
|
redir_url
|
||||||
.query_pairs_mut()
|
.query_pairs_mut()
|
||||||
.clear()
|
.clear()
|
||||||
|
|
Loading…
Reference in a new issue