org.keycloak.adapters.undertow

## Class AbstractUndertowRequestAuthenticator

- java.lang.Object
- - org.keycloak.adapters.RequestAuthenticator
  - - org.keycloak.adapters.undertow.AbstractUndertowRequestAuthenticator

- Direct Known Subclasses:
    ServletRequestAuthenticator, UndertowRequestAuthenticator

      public abstract class AbstractUndertowRequestAuthenticator
      extends RequestAuthenticator

  Version:
    $Revision: 1 $
  Author:
    Bill Burke, Stan Silvert ssilvert@redhat.com (C) 2014 Red Hat Inc.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected io.undertow.server.HttpServerExchange` | `exchange`
    `protected io.undertow.security.api.SecurityContext` | `securityContext`

    - ### Fields inherited from class org.keycloak.adapters.RequestAuthenticator

      `challenge, deployment, facade, log, sslRedirectPort, tokenStore`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractUndertowRequestAuthenticator(HttpFacade facade, KeycloakDeployment deployment, int sslRedirectPort, io.undertow.security.api.SecurityContext securityContext, io.undertow.server.HttpServerExchange exchange, AdapterTokenStore tokenStore)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `completeBearerAuthentication(KeycloakPrincipal<RefreshableKeycloakSecurityContext> principal, String method)`
    `protected void` | `completeOAuthAuthentication(KeycloakPrincipal<RefreshableKeycloakSecurityContext> principal)`
    `protected abstract KeycloakUndertowAccount` | `createAccount(KeycloakPrincipal<RefreshableKeycloakSecurityContext> principal)` Subclasses need to be able to create their own version of the KeycloakUndertowAccount
    `protected OAuthRequestAuthenticator` | `createOAuthAuthenticator()`
    `protected String` | `getHttpSessionId(boolean create)`
    `protected void` | `propagateKeycloakContext(KeycloakUndertowAccount account)`

    - ### Methods inherited from class org.keycloak.adapters.RequestAuthenticator

      `authenticate, completeAuthentication, completeAuthentication, createBasicAuthAuthenticator, createBearerTokenAuthenticator, getChallenge, verifySSL`

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

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

- - ### Field Detail

    - #### securityContext

          protected io.undertow.security.api.SecurityContext securityContext

    - #### exchange

          protected io.undertow.server.HttpServerExchange exchange

  - ### Constructor Detail

    - #### AbstractUndertowRequestAuthenticator

          public AbstractUndertowRequestAuthenticator(HttpFacade facade,
                                              KeycloakDeployment deployment,
                                              int sslRedirectPort,
                                              io.undertow.security.api.SecurityContext securityContext,
                                              io.undertow.server.HttpServerExchange exchange,
                                              AdapterTokenStore tokenStore)

  - ### Method Detail

    - #### propagateKeycloakContext

          protected void propagateKeycloakContext(KeycloakUndertowAccount account)

    - #### createOAuthAuthenticator

          protected OAuthRequestAuthenticator createOAuthAuthenticator()

      Specified by:
        `createOAuthAuthenticator` in class `RequestAuthenticator`

    - #### completeOAuthAuthentication

          protected void completeOAuthAuthentication(KeycloakPrincipal<RefreshableKeycloakSecurityContext> principal)

      Specified by:
        `completeOAuthAuthentication` in class `RequestAuthenticator`

    - #### completeBearerAuthentication

          protected void completeBearerAuthentication(KeycloakPrincipal<RefreshableKeycloakSecurityContext> principal,
                                          String method)

      Specified by:
        `completeBearerAuthentication` in class `RequestAuthenticator`

    - #### getHttpSessionId

          protected String getHttpSessionId(boolean create)

      Specified by:
        `getHttpSessionId` in class `RequestAuthenticator`

    - #### createAccount

          protected abstract KeycloakUndertowAccount createAccount(KeycloakPrincipal<RefreshableKeycloakSecurityContext> principal)

      Subclasses need to be able to create their own version of the KeycloakUndertowAccount
      Returns:
        The account

Copyright © 2015. All rights reserved.