Log some details if error happens in CIBA authentication request
Closes #14650
This commit is contained in:
parent
557a22968c
commit
f180115d27
1 changed files with 4 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
||||||
package org.keycloak.protocol.oidc.grants.ciba.endpoints;
|
package org.keycloak.protocol.oidc.grants.ciba.endpoints;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.node.ObjectNode;
|
import com.fasterxml.jackson.databind.node.ObjectNode;
|
||||||
|
import org.jboss.logging.Logger;
|
||||||
import org.jboss.resteasy.annotations.cache.NoCache;
|
import org.jboss.resteasy.annotations.cache.NoCache;
|
||||||
import org.keycloak.http.HttpRequest;
|
import org.keycloak.http.HttpRequest;
|
||||||
import org.keycloak.OAuth2Constants;
|
import org.keycloak.OAuth2Constants;
|
||||||
|
@ -61,6 +62,8 @@ import static org.keycloak.protocol.oidc.OIDCLoginProtocol.LOGIN_HINT_PARAM;
|
||||||
|
|
||||||
public class BackchannelAuthenticationEndpoint extends AbstractCibaEndpoint {
|
public class BackchannelAuthenticationEndpoint extends AbstractCibaEndpoint {
|
||||||
|
|
||||||
|
private static final Logger log = Logger.getLogger(BackchannelAuthenticationEndpoint.class);
|
||||||
|
|
||||||
private final RealmModel realm;
|
private final RealmModel realm;
|
||||||
|
|
||||||
private static final Pattern BINDING_MESSAGE_VALIDATION = Pattern.compile("^[a-zA-Z0-9-._+/!?#]{1,50}$");
|
private static final Pattern BINDING_MESSAGE_VALIDATION = Pattern.compile("^[a-zA-Z0-9-._+/!?#]{1,50}$");
|
||||||
|
@ -116,6 +119,7 @@ public class BackchannelAuthenticationEndpoint extends AbstractCibaEndpoint {
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
log.warn("Unexpected failure when processing CIBA authentication request", e);
|
||||||
throw new ErrorResponseException(OAuthErrorException.SERVER_ERROR, "Failed to send authentication request", Response.Status.SERVICE_UNAVAILABLE);
|
throw new ErrorResponseException(OAuthErrorException.SERVER_ERROR, "Failed to send authentication request", Response.Status.SERVICE_UNAVAILABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue