public class SecurityConstraint extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
BASIC_AUTH_METHOD
String constant for basic authentication.
|
static String |
CUSTOM_AUTH_METHOD
String constant for custom authentication.
|
| Constructor and Description |
|---|
SecurityConstraint()
Creates an anonymous
SecurityConstraint instance. |
SecurityConstraint(String id)
Creates a
SecurityConstraint instance with an id. |
| Modifier and Type | Method and Description |
|---|---|
void |
addRole(String role)
Adds a role to the list of roles of the
SecurityConstraint. |
String |
getId()
Returns the id of the
SecurityConstraint. |
String |
getMethod()
Returns the authorization method of the
SecurityConstraint. |
List |
getRoles()
Returns a list of roles of the
SecurityConstraint. |
void |
setMethod(String method)
Sets the authorization method of the
SecurityConstraint. |
public static final String BASIC_AUTH_METHOD
public static final String CUSTOM_AUTH_METHOD
public SecurityConstraint()
SecurityConstraint instance.public SecurityConstraint(String id)
SecurityConstraint instance with an id.id - The id of the SecurityConstraint instance.public List getRoles()
SecurityConstraint.public void addRole(String role)
SecurityConstraint.role - New role to add to the list of roles.public String getId()
SecurityConstraint.SecurityConstraint.public String getMethod()
SecurityConstraint.public void setMethod(String method)
SecurityConstraint.
Valid values are Basic and Custom.method - The authentication method to set which can be custom or basic.Copyright © 2015 The Apache Software Foundation. All rights reserved.