public class FormAuthenticationMechanism extends Object implements AuthenticationMechanism
AuthenticationMechanism.AuthenticationMechanismOutcome, AuthenticationMechanism.ChallengeResult
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_POST_LOCATION |
static String |
LOCATION_ATTRIBUTE |
Constructor and Description |
---|
FormAuthenticationMechanism(FormParserFactory formParserFactory,
String name,
String loginPage,
String errorPage) |
FormAuthenticationMechanism(FormParserFactory formParserFactory,
String name,
String loginPage,
String errorPage,
IdentityManager identityManager) |
FormAuthenticationMechanism(FormParserFactory formParserFactory,
String name,
String loginPage,
String errorPage,
String postLocation) |
FormAuthenticationMechanism(FormParserFactory formParserFactory,
String name,
String loginPage,
String errorPage,
String postLocation,
IdentityManager identityManager) |
FormAuthenticationMechanism(String name,
String loginPage,
String errorPage) |
FormAuthenticationMechanism(String name,
String loginPage,
String errorPage,
String postLocation) |
Modifier and Type | Method and Description |
---|---|
AuthenticationMechanism.AuthenticationMechanismOutcome |
authenticate(HttpServerExchange exchange,
SecurityContext securityContext)
Perform authentication of the request.
|
protected void |
handleRedirectBack(HttpServerExchange exchange) |
AuthenticationMechanism.AuthenticationMechanismOutcome |
runFormAuth(HttpServerExchange exchange,
SecurityContext securityContext) |
AuthenticationMechanism.ChallengeResult |
sendChallenge(HttpServerExchange exchange,
SecurityContext securityContext)
Send an authentication challenge to the remote client.
|
protected Integer |
servePage(HttpServerExchange exchange,
String location) |
protected void |
storeInitialLocation(HttpServerExchange exchange) |
public static final String LOCATION_ATTRIBUTE
public static final String DEFAULT_POST_LOCATION
public FormAuthenticationMechanism(String name, String loginPage, String errorPage)
public FormAuthenticationMechanism(String name, String loginPage, String errorPage, String postLocation)
public FormAuthenticationMechanism(FormParserFactory formParserFactory, String name, String loginPage, String errorPage)
public FormAuthenticationMechanism(FormParserFactory formParserFactory, String name, String loginPage, String errorPage, IdentityManager identityManager)
public FormAuthenticationMechanism(FormParserFactory formParserFactory, String name, String loginPage, String errorPage, String postLocation)
public FormAuthenticationMechanism(FormParserFactory formParserFactory, String name, String loginPage, String errorPage, String postLocation, IdentityManager identityManager)
public AuthenticationMechanism.AuthenticationMechanismOutcome authenticate(HttpServerExchange exchange, SecurityContext securityContext)
AuthenticationMechanism
authenticate
in interface AuthenticationMechanism
exchange
- The exchangepublic AuthenticationMechanism.AuthenticationMechanismOutcome runFormAuth(HttpServerExchange exchange, SecurityContext securityContext)
protected void handleRedirectBack(HttpServerExchange exchange)
public AuthenticationMechanism.ChallengeResult sendChallenge(HttpServerExchange exchange, SecurityContext securityContext)
AuthenticationMechanism
The individual mechanisms should update the response headers and body of the message as appropriate however they should
not set the response code, instead that should be indicated in the AuthenticationMechanism.ChallengeResult
and the most appropriate
overall response code will be selected.
This method should not return null
.
sendChallenge
in interface AuthenticationMechanism
exchange
- The exchangesecurityContext
- The security contextAuthenticationMechanism.ChallengeResult
indicating if a challenge was sent and the desired response code.protected void storeInitialLocation(HttpServerExchange exchange)
protected Integer servePage(HttpServerExchange exchange, String location)
Copyright © 2017 JBoss by Red Hat. All rights reserved.