public enum AuthenticationMethod extends Enum<AuthenticationMethod>
| Enum Constant and Description |
|---|
Basic
HTTP Basic Authentication.
|
Form
Form Authentication.
|
None
No authentication.
|
Other
Other authentication.
|
| Modifier and Type | Method and Description |
|---|---|
static AuthenticationMethod |
extract(javax.servlet.ServletContext webapp)
Extract the authentication method from the init parameter of
the Web application.
|
Credentials |
getCredentials(javax.servlet.ServletRequest request)
Get the user credentials after authentication.
|
static void |
reset(javax.servlet.ServletContext webapp)
Remove this attribute from the Web application.
|
static AuthenticationMethod |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AuthenticationMethod[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AuthenticationMethod Basic
public static final AuthenticationMethod Form
public static final AuthenticationMethod Other
public static final AuthenticationMethod None
public static AuthenticationMethod[] values()
for (AuthenticationMethod c : AuthenticationMethod.values()) System.out.println(c);
public static AuthenticationMethod valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic Credentials getCredentials(javax.servlet.ServletRequest request)
request - The request.public static AuthenticationMethod extract(javax.servlet.ServletContext webapp)
<context-param>
<param-name>ml.alternet.security.web.config.authenticationMethod</param-name>
<param-value>Basic</param-value>
</context-param>
Once extracted, the parameter is set as an attribute of the application.webapp - The Web applicationreset(ServletContext)public static void reset(javax.servlet.ServletContext webapp)
webapp - The Web application.extract(ServletContext)Copyright © 2018 Alternet. All rights reserved.