This authenticator implements form authentication will use dispatchers to
the login page if the __FORM_DISPATCH init parameter is set to true.
Otherwise it will redirect.
The form authenticator redirects unauthenticated requests to a log page
which should use a form to gather username/password from the user and send them
to the /j_security_check URI within the context. FormAuthentication uses
SessionAuthentication to wrap Authentication results so that they
are associated with the session.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| private boolean | |
| private boolean | |
| private String | |
| private String | |
| private String | |
| private String | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private AuthenticationState | |
| protected String | |
| public boolean | |
| public String | |
| public Constraint. | getConstraintAuthentication(String
The pathInContext to potentially constrain. pathInContext, Constraint.The existing authentication constraint for the pathInContext determined independently of existing,AuthenticatorFunction to get or create a getSession)Session.Overrides default org. Constraint. applicable to the path for
this authenticator.
|
| protected Fields | |
| public boolean | |
| public boolean | |
| public UserIdentity | login(String
the username of the client to be authenticated username, Object the user's credential password, Request the inbound request that needs authentication request, Response response)Overrides org. LoginService#login(String, Object, Request, Function) is not null, it
is assumed that the user is fully authenticated and we need to change the session id to prevent
session fixation vulnerability.
|
| public void | logout(Request request, Response response)
Overrides org. |
| public Request | prepareRequest(Request
the request to prepare for handling request, AuthenticationState The authentication for the request authenticationState)Overrides default org. validateRequest(Request, Response, Callback) and
before calling org.
of the nested handler.
|
| private AuthenticationState | |
| private AuthenticationState | |
| public void | setAlwaysSaveUri(boolean
true to always save the uri alwaysSave)If true, uris that cause a redirect to a login page will always be remembered. |
| public void | setConfiguration(Authenticator.
the configuration configurationOverrides org. Implements org. |
| private void | |
| private void | |
| public AuthenticationState | validateRequest(Request
The request request, Response The response response, Callback the callback to use for writing a response callback)Implements org. |
| __FORM_DISPATCH | back to summary |
|---|---|
| public static final String __FORM_DISPATCH | |
| __FORM_ERROR_PAGE | back to summary |
|---|---|
| public static final String __FORM_ERROR_PAGE | |
| __FORM_LOGIN_PAGE | back to summary |
|---|---|
| public static final String __FORM_LOGIN_PAGE | |
| __J_METHOD | back to summary |
|---|---|
| public static final String __J_METHOD | |
| __J_PASSWORD | back to summary |
|---|---|
| public static final String __J_PASSWORD | |
| __J_POST | back to summary |
|---|---|
| public static final String __J_POST | |
| __J_SECURITY_CHECK | back to summary |
|---|---|
| public static final String __J_SECURITY_CHECK | |
| __J_URI | back to summary |
|---|---|
| public static final String __J_URI | |
| __J_USERNAME | back to summary |
|---|---|
| public static final String __J_USERNAME | |
| _alwaysSaveUri | back to summary |
|---|---|
| private boolean _alwaysSaveUri | |
| _dispatch | back to summary |
|---|---|
| private boolean _dispatch | |
| _formErrorPage | back to summary |
|---|---|
| private String _formErrorPage | |
| _formErrorPath | back to summary |
|---|---|
| private String _formErrorPath | |
| _formLoginPage | back to summary |
|---|---|
| private String _formLoginPage | |
| _formLoginPath | back to summary |
|---|---|
| private String _formLoginPath | |
| LOG | back to summary |
|---|---|
| private static final Logger LOG Hides org. | |
| FormAuthenticator | back to summary |
|---|---|
| public FormAuthenticator() | |
| FormAuthenticator | back to summary |
|---|---|
| public FormAuthenticator(String login, String error, boolean dispatch) | |
| dispatch | back to summary |
|---|---|
| private AuthenticationState dispatch(String path, Request request, Response response, Callback callback) | |
| encodeURL | back to summary |
|---|---|
| protected String encodeURL(String url, Request request) | |
| getAlwaysSaveUri | back to summary |
|---|---|
| public boolean getAlwaysSaveUri() | |
| getAuthenticationType | back to summary |
|---|---|
| public String getAuthenticationType() Implements org.
| |
| getConstraintAuthentication | back to summary |
|---|---|
| public Constraint. Overrides default org. Doc from org. Get an
| |
| getParameters | back to summary |
|---|---|
| protected Fields getParameters(Request request) | |
| isJSecurityCheck | back to summary |
|---|---|
| public boolean isJSecurityCheck(String uri) | |
| isLoginOrErrorPage | back to summary |
|---|---|
| public boolean isLoginOrErrorPage(String pathInContext) | |
| login | back to summary |
|---|---|
| public UserIdentity login(String username, Object password, Request request, Response response) Overrides org. Doc from org. If the UserIdentity returned from
| |
| logout | back to summary |
|---|---|
| public void logout(Request request, Response response) Overrides org.
| |
| prepareRequest | back to summary |
|---|---|
| public Request prepareRequest(Request request, AuthenticationState authenticationState) Overrides default org. Doc from org. Called after
| |
| sendChallenge | back to summary |
|---|---|
| private AuthenticationState sendChallenge(Request request, Response response, Callback callback) | |
| sendError | back to summary |
|---|---|
| private AuthenticationState sendError(Request request, Response response, Callback callback) | |
| setAlwaysSaveUri | back to summary |
|---|---|
| public void setAlwaysSaveUri(boolean alwaysSave) If true, uris that cause a redirect to a login page will always be remembered. If false, only the first uri that leads to a login page redirect is remembered. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=379909
| |
| setConfiguration | back to summary |
|---|---|
| public void setConfiguration(Authenticator. Overrides org. Implements org. Doc from org. Configure the Authenticator
| |
| setErrorPage | back to summary |
|---|---|
| private void setErrorPage(String path) | |
| setLoginPage | back to summary |
|---|---|
| private void setLoginPage(String path) | |
| validateRequest | back to summary |
|---|---|
| public AuthenticationState validateRequest(Request request, Response response, Callback callback) throws ServerAuthException Implements org. Doc from org. Validate a request
| |