Search in sources :

Example 6 with AuthorizationRequestContext

use of org.keycloak.services.clientpolicy.context.AuthorizationRequestContext in project keycloak by keycloak.

the class SecureSessionEnforceExecutor method executeOnEvent.

@Override
public void executeOnEvent(ClientPolicyContext context) throws ClientPolicyException {
    switch(context.getEvent()) {
        case AUTHORIZATION_REQUEST:
            AuthorizationRequestContext authorizationRequestContext = (AuthorizationRequestContext) context;
            executeOnAuthorizationRequest(authorizationRequestContext.getparsedResponseType(), authorizationRequestContext.getAuthorizationEndpointRequest(), authorizationRequestContext.getRedirectUri());
            return;
        default:
            return;
    }
}
Also used : AuthorizationRequestContext(org.keycloak.services.clientpolicy.context.AuthorizationRequestContext)

Aggregations

AuthorizationRequestContext (org.keycloak.services.clientpolicy.context.AuthorizationRequestContext)6 ClientPolicyException (org.keycloak.services.clientpolicy.ClientPolicyException)2 ClientCRUDContext (org.keycloak.services.clientpolicy.context.ClientCRUDContext)2 JsonProperty (com.fasterxml.jackson.annotation.JsonProperty)1 JsonNode (com.fasterxml.jackson.databind.JsonNode)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Optional (java.util.Optional)1 MultivaluedMap (javax.ws.rs.core.MultivaluedMap)1 Logger (org.jboss.logging.Logger)1 OAuthErrorException (org.keycloak.OAuthErrorException)1 INVALID_REQUEST_OBJECT (org.keycloak.OAuthErrorException.INVALID_REQUEST_OBJECT)1 Time (org.keycloak.common.util.Time)1 KeycloakSession (org.keycloak.models.KeycloakSession)1 OIDCLoginProtocol (org.keycloak.protocol.oidc.OIDCLoginProtocol)1 AuthzEndpointRequestParser (org.keycloak.protocol.oidc.endpoints.request.AuthzEndpointRequestParser)1 OIDCResponseMode (org.keycloak.protocol.oidc.utils.OIDCResponseMode)1 ClientPolicyExecutorConfigurationRepresentation (org.keycloak.representations.idm.ClientPolicyExecutorConfigurationRepresentation)1 Urls (org.keycloak.services.Urls)1 ClientPolicyContext (org.keycloak.services.clientpolicy.ClientPolicyContext)1