org.keycloak.adapters.undertow

## Class ServletKeycloakAuthMech

- java.lang.Object
- - org.keycloak.adapters.undertow.ServletKeycloakAuthMech

- All Implemented Interfaces:
    io.undertow.security.api.AuthenticationMechanism
  Direct Known Subclasses:
    WildflyAuthenticationMechanism

      public class ServletKeycloakAuthMech
      extends Object
      implements io.undertow.security.api.AuthenticationMechanism

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface io.undertow.security.api.AuthenticationMechanism

      `io.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcome, io.undertow.security.api.AuthenticationMechanism.ChallengeResult`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AdapterDeploymentContext` | `deploymentContext`
    `static io.undertow.util.AttachmentKey<AuthChallenge>` | `KEYCLOAK_CHALLENGE_ATTACHMENT_KEY`
    `protected io.undertow.servlet.api.ConfidentialPortManager` | `portManager`
    `protected UndertowUserSessionManagement` | `userSessionManagement`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ServletKeycloakAuthMech(AdapterDeploymentContext deploymentContext, UndertowUserSessionManagement userSessionManagement, io.undertow.servlet.api.ConfidentialPortManager portManager)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `io.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcome` | `authenticate(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext)`
    `protected ServletRequestAuthenticator` | `createRequestAuthenticator(KeycloakDeployment deployment, io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext, UndertowHttpFacade facade)`
    `io.undertow.security.api.AuthenticationMechanism.ChallengeResult` | `sendChallenge(io.undertow.server.HttpServerExchange exchange, io.undertow.security.api.SecurityContext securityContext)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### KEYCLOAK_CHALLENGE_ATTACHMENT_KEY

          public static final io.undertow.util.AttachmentKey<AuthChallenge> KEYCLOAK_CHALLENGE_ATTACHMENT_KEY

    - #### deploymentContext

          protected AdapterDeploymentContext deploymentContext

    - #### userSessionManagement

          protected UndertowUserSessionManagement userSessionManagement

    - #### portManager

          protected io.undertow.servlet.api.ConfidentialPortManager portManager

  - ### Constructor Detail

    - #### ServletKeycloakAuthMech

          public ServletKeycloakAuthMech(AdapterDeploymentContext deploymentContext,
                                 UndertowUserSessionManagement userSessionManagement,
                                 io.undertow.servlet.api.ConfidentialPortManager portManager)

  - ### Method Detail

    - #### authenticate

          public io.undertow.security.api.AuthenticationMechanism.AuthenticationMechanismOutcome authenticate(io.undertow.server.HttpServerExchange exchange,
                                                                                                     io.undertow.security.api.SecurityContext securityContext)

      Specified by:
        `authenticate` in interface `io.undertow.security.api.AuthenticationMechanism`

    - #### createRequestAuthenticator

          protected ServletRequestAuthenticator createRequestAuthenticator(KeycloakDeployment deployment,
                                                               io.undertow.server.HttpServerExchange exchange,
                                                               io.undertow.security.api.SecurityContext securityContext,
                                                               UndertowHttpFacade facade)

    - #### sendChallenge

          public io.undertow.security.api.AuthenticationMechanism.ChallengeResult sendChallenge(io.undertow.server.HttpServerExchange exchange,
                                                                                       io.undertow.security.api.SecurityContext securityContext)

      Specified by:
        `sendChallenge` in interface `io.undertow.security.api.AuthenticationMechanism`

Copyright © 2014. All Rights Reserved.