Just display login with warning if Kerberos login failed

This commit is contained in:
mposolda 2015-02-11 19:11:03 +01:00
parent e63900dac9
commit eed54d6198
2 changed files with 5 additions and 3 deletions

View file

@ -107,9 +107,11 @@ public class KerberosIdentityProvider extends AbstractIdentityProvider<KerberosI
Response response = request.getSession().getProvider(LoginFormsProvider.class) Response response = request.getSession().getProvider(LoginFormsProvider.class)
.setRealm(request.getRealm()) .setRealm(request.getRealm())
.setUriInfo(request.getUriInfo()) .setUriInfo(request.getUriInfo())
.setError("errorKerberosLogin") .setClient(request.getClientSession().getClient())
.setClientSessionCode(getRelayState(request))
.setWarning("errorKerberosLogin")
.setStatus(Response.Status.UNAUTHORIZED) .setStatus(Response.Status.UNAUTHORIZED)
.createErrorPage(); .createLogin();
response.getMetadata().putSingle(HttpHeaders.WWW_AUTHENTICATE, negotiateHeader); response.getMetadata().putSingle(HttpHeaders.WWW_AUTHENTICATE, negotiateHeader);
return AuthenticationResponse.fromResponse(response); return AuthenticationResponse.fromResponse(response);

View file

@ -98,7 +98,7 @@ actionPasswordWarning=You need to change your password to activate your account.
actionEmailWarning=You need to verify your email address to activate your account. actionEmailWarning=You need to verify your email address to activate your account.
actionFollow=Please fill in the fields below. actionFollow=Please fill in the fields below.
errorKerberosLogin=Unable to login with Kerberos errorKerberosLogin=Unable to login with Kerberos. Request Kerberos ticket or use different login mechanism
successHeader=Success! successHeader=Success!
errorHeader=Error! errorHeader=Error!