Class ServletSecurityContext
java.lang.Object
org.jboss.resteasy.plugins.server.servlet.ServletSecurityContext
- All Implemented Interfaces:
SecurityContext
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Field Summary
Fields inherited from interface jakarta.ws.rs.core.SecurityContext
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the string value of the authentication scheme used to protect the resource.Returns ajava.security.Principalobject containing the name of the current authenticated user.booleanisSecure()Returns a boolean indicating whether this request was made using a secure channel, such as HTTPS.booleanisUserInRole(String role) Returns a boolean indicating whether the authenticated user is included in the specified logical "role".
-
Constructor Details
-
ServletSecurityContext
-
-
Method Details
-
getUserPrincipal
Description copied from interface:SecurityContextReturns ajava.security.Principalobject containing the name of the current authenticated user. If the user has not been authenticated, the method returns null.- Specified by:
getUserPrincipalin interfaceSecurityContext- Returns:
- a
java.security.Principalcontaining the name of the user making this request; null if the user has not been authenticated
-
isUserInRole
Description copied from interface:SecurityContextReturns a boolean indicating whether the authenticated user is included in the specified logical "role". If the user has not been authenticated, the method returnsfalse.- Specified by:
isUserInRolein interfaceSecurityContext- Parameters:
role- aStringspecifying the name of the role- Returns:
- a
booleanindicating whether the user making the request belongs to a given role;falseif the user has not been authenticated
-
isSecure
public boolean isSecure()Description copied from interface:SecurityContextReturns a boolean indicating whether this request was made using a secure channel, such as HTTPS.- Specified by:
isSecurein interfaceSecurityContext- Returns:
trueif the request was made using a secure channel,falseotherwise
-
getAuthenticationScheme
Description copied from interface:SecurityContextReturns the string value of the authentication scheme used to protect the resource. If the resource is not authenticated, null is returned. Values are the same as the CGI variable AUTH_TYPE- Specified by:
getAuthenticationSchemein interfaceSecurityContext- Returns:
- one of the static members BASIC_AUTH, FORM_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH (suitable for == comparison) or the container-specific string indicating the authentication scheme, or null if the request was not authenticated.
-