public class FormAuthConfig extends Object
| Constructor and Description |
|---|
FormAuthConfig(String formAction,
String userNameInputTagName,
String passwordInputTagName)
Create a form auth config with a pre-defined form action, username input tag, password input tag.
|
| Modifier and Type | Method and Description |
|---|---|
FormAuthConfig |
and()
Syntactic sugar
|
String |
getFormAction() |
LogConfig |
getLogConfig() |
LogDetail |
getLogDetail() |
String |
getPasswordInputTagName() |
String |
getUserInputTagName() |
boolean |
isLoggingEnabled() |
static FormAuthConfig |
springSecurity() |
FormAuthConfig |
withLoggingEnabled()
Enables logging with log level
LogDetail.ALL of the request made to authenticate using
form authentication. |
FormAuthConfig |
withLoggingEnabled(LogConfig logConfig)
Enables logging with log level
LogDetail.ALL of the request made to authenticate using
form authentication using the specified LogConfig. |
FormAuthConfig |
withLoggingEnabled(LogDetail logDetail)
Enables logging with the supplied logDetail of the request made to authenticate using form authentication.
|
FormAuthConfig |
withLoggingEnabled(LogDetail logDetail,
LogConfig logConfig)
Enables logging with the supplied log detail of the request made to authenticate using form authentication using the
specified
LogConfig. |
public FormAuthConfig(String formAction, String userNameInputTagName, String passwordInputTagName)
<form action="/j_spring_security_check">
<label for="j_username">Username</label>
<input type="text" name="j_username" id="j_username"/>
<br/>
<label for="j_password">Password</label>
<input type="password" name="j_password" id="j_password"/>
<br/>
<input type='checkbox' name='_spring_security_remember_me'/> Remember me on this computer.
<br/>
<input type="submit" value="Login"/>
</form>
This means that formAction should be set to /j_spring_security_check, userNameInputTagName
should be set to j_username and passwordInputTagName should be set to j_password.formAction - The action of the formuserNameInputTagName - The name of the username input tag in the login formpasswordInputTagName - The name of the password input tag in the login formpublic static FormAuthConfig springSecurity()
public FormAuthConfig withLoggingEnabled()
LogDetail.ALL of the request made to authenticate using
form authentication. Both the request and the response is logged.public FormAuthConfig withLoggingEnabled(LogDetail logDetail)
public FormAuthConfig withLoggingEnabled(LogConfig logConfig)
LogDetail.ALL of the request made to authenticate using
form authentication using the specified LogConfig. Both the request and the response is logged.public FormAuthConfig withLoggingEnabled(LogDetail logDetail, LogConfig logConfig)
LogConfig. Both the request and the response is logged.public FormAuthConfig and()
public String getFormAction()
public String getUserInputTagName()
public String getPasswordInputTagName()
public LogConfig getLogConfig()
public boolean isLoggingEnabled()
public LogDetail getLogDetail()
Copyright © 2010–2014. All rights reserved.