org.keycloak.proxy

## Class ConstraintAuthorizationHandler

- java.lang.Object
- - org.keycloak.proxy.ConstraintAuthorizationHandler

- All Implemented Interfaces:
    io.undertow.server.HttpHandler

      public class ConstraintAuthorizationHandler
      extends Object
      implements io.undertow.server.HttpHandler

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `errorPage`
    `static io.undertow.util.HttpString` | `KEYCLOAK_ACCESS_TOKEN`
    `static io.undertow.util.HttpString` | `KEYCLOAK_EMAIL`
    `static io.undertow.util.HttpString` | `KEYCLOAK_NAME`
    `static io.undertow.util.HttpString` | `KEYCLOAK_SUBJECT`
    `static io.undertow.util.HttpString` | `KEYCLOAK_USERNAME`
    `protected io.undertow.server.HttpHandler` | `next`
    `protected boolean` | `sendAccessToken`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConstraintAuthorizationHandler(io.undertow.server.HttpHandler next, String errorPage, boolean sendAccessToken)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `authenticatedRequest(KeycloakUndertowAccount account, io.undertow.server.HttpServerExchange exchange)`
    `void` | `handleRequest(io.undertow.server.HttpServerExchange exchange)`

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

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

- - ### Field Detail

    - #### KEYCLOAK_SUBJECT

          public static final io.undertow.util.HttpString KEYCLOAK_SUBJECT

    - #### KEYCLOAK_USERNAME

          public static final io.undertow.util.HttpString KEYCLOAK_USERNAME

    - #### KEYCLOAK_EMAIL

          public static final io.undertow.util.HttpString KEYCLOAK_EMAIL

    - #### KEYCLOAK_NAME

          public static final io.undertow.util.HttpString KEYCLOAK_NAME

    - #### KEYCLOAK_ACCESS_TOKEN

          public static final io.undertow.util.HttpString KEYCLOAK_ACCESS_TOKEN

    - #### next

          protected io.undertow.server.HttpHandler next

    - #### errorPage

          protected String errorPage

    - #### sendAccessToken

          protected boolean sendAccessToken

  - ### Constructor Detail

    - #### ConstraintAuthorizationHandler

          public ConstraintAuthorizationHandler(io.undertow.server.HttpHandler next,
                                        String errorPage,
                                        boolean sendAccessToken)

  - ### Method Detail

    - #### handleRequest

          public void handleRequest(io.undertow.server.HttpServerExchange exchange)
                             throws Exception

      Specified by:
        `handleRequest` in interface `io.undertow.server.HttpHandler`
      Throws:
        `Exception`

    - #### authenticatedRequest

          public void authenticatedRequest(KeycloakUndertowAccount account,
                                  io.undertow.server.HttpServerExchange exchange)
                                    throws Exception

      Throws:
        `Exception`

Copyright © 2015. All Rights Reserved.