Class PreAuthorizedCodeGrantType

java.lang.Object
org.keycloak.protocol.oidc.grants.OAuth2GrantTypeBase
org.keycloak.protocol.oidc.grants.PreAuthorizedCodeGrantType
All Implemented Interfaces:
OAuth2GrantType, Provider

public class PreAuthorizedCodeGrantType extends OAuth2GrantTypeBase
  • Constructor Details

    • PreAuthorizedCodeGrantType

      public PreAuthorizedCodeGrantType()
  • Method Details

    • process

      public jakarta.ws.rs.core.Response process(OAuth2GrantType.Context context)
      Description copied from interface: OAuth2GrantType
      Processes grant request.
      Parameters:
      context - grant request context
      Returns:
      token response
    • getEventType

      public EventType getEventType()
      Description copied from interface: OAuth2GrantType
      Returns the event type associated with this OAuth 2.0 grant type.
      Returns:
      event type
    • getPreAuthorizedCode

      public static String getPreAuthorizedCode(KeycloakSession session, AuthenticatedClientSessionModel authenticatedClientSession, int expirationTime)
      Create a pre-authorized Code for the given client session.
      Parameters:
      session - - keycloak session to be used
      authenticatedClientSession - - client session to be persisted
      expirationTime - - expiration time of the code, the code should be short-lived
      Returns:
      the pre-authorized code