[KEYCLOAK-11219] log an explicit error message when state is null
This commit is contained in:
parent
71e6fc2b30
commit
aadd5331bc
1 changed files with 8 additions and 0 deletions
|
@ -102,6 +102,14 @@ public class OIDCIdentityProvider extends AbstractOAuth2IdentityProvider<OIDCIde
|
|||
@GET
|
||||
@Path("logout_response")
|
||||
public Response logoutResponse(@QueryParam("state") String state) {
|
||||
if (state == null){
|
||||
logger.error("no state parameter returned");
|
||||
EventBuilder event = new EventBuilder(realm, session, clientConnection);
|
||||
event.event(EventType.LOGOUT);
|
||||
event.error(Errors.USER_SESSION_NOT_FOUND);
|
||||
return ErrorPage.error(session, null, Response.Status.BAD_REQUEST, Messages.IDENTITY_PROVIDER_UNEXPECTED_ERROR);
|
||||
|
||||
}
|
||||
UserSessionModel userSession = session.sessions().getUserSession(realm, state);
|
||||
if (userSession == null) {
|
||||
logger.error("no valid user session");
|
||||
|
|
Loading…
Reference in a new issue