Merge pull request #1472 from patriot1burke/master
clean up client sessions
This commit is contained in:
commit
bc187fe7b3
2 changed files with 3 additions and 0 deletions
|
@ -444,8 +444,10 @@ public class SamlProtocol implements LoginProtocol {
|
|||
@Override
|
||||
public Response consentDenied(ClientSessionModel clientSession) {
|
||||
if ("true".equals(clientSession.getClient().getAttribute(SAML_IDP_INITIATED_LOGIN))) {
|
||||
session.sessions().removeClientSession(realm, clientSession);
|
||||
return ErrorPage.error(session, Messages.CONSENT_DENIED);
|
||||
} else {
|
||||
session.sessions().removeClientSession(realm, clientSession);
|
||||
return getErrorResponse(clientSession, JBossSAMLURIConstants.STATUS_REQUEST_DENIED.get());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,6 +148,7 @@ public class OIDCLoginProtocol implements LoginProtocol {
|
|||
UriBuilder redirectUri = UriBuilder.fromUri(redirect).queryParam(OAuth2Constants.ERROR, "access_denied");
|
||||
if (state != null)
|
||||
redirectUri.queryParam(OAuth2Constants.STATE, state);
|
||||
session.sessions().removeClientSession(realm, clientSession);
|
||||
Response.ResponseBuilder location = Response.status(302).location(redirectUri.build());
|
||||
return location.build();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue