public interface SecurityContext
Context| Modifier and Type | Field and Description |
|---|---|
static String |
BASIC_AUTH
String identifier for Basic authentication.
|
static String |
CLIENT_CERT_AUTH
String identifier for Client Certificate authentication.
|
static String |
DIGEST_AUTH
String identifier for Digest authentication.
|
static String |
FORM_AUTH
String identifier for Form authentication.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getAuthenticationScheme()
Returns the string value of the authentication scheme used to protect the resource.
|
Principal |
getUserPrincipal()
Returns a
java.security.Principal object containing the name of the current authenticated user. |
boolean |
isSecure()
Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.
|
boolean |
isUserInRole(String role)
Returns a boolean indicating whether the authenticated user is included in the specified logical "role".
|
static final String BASIC_AUTH
static final String CLIENT_CERT_AUTH
static final String DIGEST_AUTH
static final String FORM_AUTH
Principal getUserPrincipal()
java.security.Principal object containing the name of the current authenticated user. If the
user has not been authenticated, the method returns null.java.security.Principal containing the name of the user making this request; null if the user
has not been authenticatedIllegalStateException - if called outside the scope of a requestboolean isUserInRole(String role)
false.role - a String specifying the name of the roleboolean indicating whether the user making the request belongs to a given role;
false if the user has not been authenticatedIllegalStateException - if called outside the scope of a requestboolean isSecure()
true if the request was made using a secure channel, false otherwiseIllegalStateException - if called outside the scope of a requestString getAuthenticationScheme()
IllegalStateException - if called outside the scope of a requestCopyright © 2018,2020 Eclipse Foundation.
Use is subject to license terms.