io.undertow.security.handlers

## Class SecurityInitialHandler

- java.lang.Object
- - io.undertow.security.handlers.AbstractSecurityContextAssociationHandler
  - - io.undertow.security.handlers.SecurityInitialHandler

All Implemented Interfaces:
  HttpHandler

    public class SecurityInitialHandler
    extends AbstractSecurityContextAssociationHandler

The security handler responsible for attaching the SecurityContext to the current `HttpServerExchange`. This handler is called early in the processing of the incoming request, subsequently supported authentication mechanisms will be added to the context, a decision will then be made if authentication is required or optional and the associated mechanisms will be called. In addition to the HTTPExchange authentication state can also be associated with the `HttpServerConnection` and with the `Session` however this is mechanism specific so it is down to the actual mechanisms to decide if there is state that can be re-used.

Author:
  Darran Lofthouse

### Constructor Summary

Constructors
Constructor and Description
`SecurityInitialHandler(AuthenticationMode authenticationMode, IdentityManager identityManager, HttpHandler next)`
`SecurityInitialHandler(AuthenticationMode authenticationMode, IdentityManager identityManager, String programaticMechName, HttpHandler next)`
`SecurityInitialHandler(AuthenticationMode authenticationMode, IdentityManager identityManager, String programaticMechName, SecurityContextFactory contextFactory, HttpHandler next)`

### Method Summary

All Methods Instance Methods Concrete Methods
`SecurityContext` `createSecurityContext(HttpServerExchange exchange)`

### Methods inherited from class io.undertow.security.handlers.AbstractSecurityContextAssociationHandler

`handleRequest`

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

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

### Constructor Detail

#### SecurityInitialHandler

    public SecurityInitialHandler(AuthenticationMode authenticationMode,
                                  IdentityManager identityManager,
                                  String programaticMechName,
                                  SecurityContextFactory contextFactory,
                                  HttpHandler next)

#### SecurityInitialHandler

    public SecurityInitialHandler(AuthenticationMode authenticationMode,
                                  IdentityManager identityManager,
                                  String programaticMechName,
                                  HttpHandler next)

#### SecurityInitialHandler

    public SecurityInitialHandler(AuthenticationMode authenticationMode,
                                  IdentityManager identityManager,
                                  HttpHandler next)

### Method Detail

#### createSecurityContext

    public SecurityContext createSecurityContext(HttpServerExchange exchange)

Specified by:
  `createSecurityContext` in class `AbstractSecurityContextAssociationHandler`
See Also:
  `AbstractSecurityContextAssociationHandler.createSecurityContext(io.undertow.server.HttpServerExchange)`