mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-09 23:12:06 -03:30
KEYCLOAK-10751 Fix SAML undertow adapter not sending challenge
Co-Authored-By: mhajas <mhajas@redhat.com> Co-Authored-By: Hynek Mlnarik <hmlnarik@redhat.com>
This commit is contained in:
parent
5b40691deb
commit
cc8cfd4269
@ -136,6 +136,7 @@ public abstract class AbstractSamlAuthMech implements AuthenticationMechanism {
|
||||
}
|
||||
if (outcome == AuthOutcome.NOT_AUTHENTICATED) {
|
||||
// we are in passive mode and user is not authenticated, let app server to try another auth mechanism
|
||||
// See KEYCLOAK-2107, AbstractSamlAuthenticationHandler
|
||||
return AuthenticationMechanismOutcome.NOT_ATTEMPTED;
|
||||
}
|
||||
if (outcome == AuthOutcome.LOGGED_OUT) {
|
||||
@ -148,6 +149,9 @@ public abstract class AbstractSamlAuthMech implements AuthenticationMechanism {
|
||||
AuthChallenge challenge = authenticator.getChallenge();
|
||||
if (challenge != null) {
|
||||
exchange.putAttachment(KEYCLOAK_CHALLENGE_ATTACHMENT_KEY, challenge);
|
||||
if (authenticator instanceof UndertowSamlEndpoint) {
|
||||
exchange.getSecurityContext().setAuthenticationRequired();
|
||||
}
|
||||
}
|
||||
|
||||
if (outcome == AuthOutcome.FAILED) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user