|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SecurityContext
An injectable interface that provides access to security related information.
Context
Field Summary | |
---|---|
static java.lang.String |
BASIC_AUTH
String identifier for Basic authentication. |
static java.lang.String |
CLIENT_CERT_AUTH
String identifier for Client Certificate authentication. |
static java.lang.String |
DIGEST_AUTH
String identifier for Digest authentication. |
static java.lang.String |
FORM_AUTH
String identifier for Form authentication. |
Method Summary | |
---|---|
java.lang.String |
getAuthenticationScheme()
Returns the string value of the authentication scheme used to protect the resource. |
java.security.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(java.lang.String role)
Returns a boolean indicating whether the authenticated user is included in the specified logical "role". |
Field Detail |
---|
static final java.lang.String BASIC_AUTH
static final java.lang.String CLIENT_CERT_AUTH
static final java.lang.String DIGEST_AUTH
static final java.lang.String FORM_AUTH
Method Detail |
---|
java.security.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
authenticated
java.lang.IllegalStateException
- if called outside the scope of a requestboolean isUserInRole(java.lang.String role)
false
.
role
- a String
specifying the name of the role
boolean
indicating whether the user making
the request belongs to a given role; false
if the user
has not been authenticated
java.lang.IllegalStateException
- if called outside the scope of a requestboolean isSecure()
true
if the request was made using a secure
channel, false
otherwise
java.lang.IllegalStateException
- if called outside the scope of a requestjava.lang.String getAuthenticationScheme()
java.lang.IllegalStateException
- if called outside the scope of a request
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2009, 2010, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.
Generated on 4-June-2010 04:34