Class OAuth1SecurityContext
java.lang.Object
org.glassfish.jersey.server.oauth1.OAuth1SecurityContext
- All Implemented Interfaces:
javax.ws.rs.core.SecurityContext
Security request that gets injected into the context by the OAuth filter
based on the access token attached to the request.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final OAuth1Consumer
private final boolean
private final OAuth1Token
Fields inherited from interface javax.ws.rs.core.SecurityContext
BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
-
Constructor Summary
ConstructorsConstructorDescriptionOAuth1SecurityContext
(OAuth1Consumer consumer, boolean isSecure) Create a new OAuth security context fromconsumer
.OAuth1SecurityContext
(OAuth1Token token, boolean isSecure) Create a new OAuth security context fromAccess Token
. -
Method Summary
-
Field Details
-
consumer
-
token
-
isSecure
private final boolean isSecure
-
-
Constructor Details
-
OAuth1SecurityContext
Create a new OAuth security context fromconsumer
.- Parameters:
consumer
- OAuth consumer for which the context will be created.isSecure
-true
if the request is secured over SSL (HTTPS).
-
OAuth1SecurityContext
Create a new OAuth security context fromAccess Token
.- Parameters:
token
- Access Token.isSecure
-true
if the request is secured over SSL (HTTPS).
-
-
Method Details
-
getUserPrincipal
- Specified by:
getUserPrincipal
in interfacejavax.ws.rs.core.SecurityContext
-
isUserInRole
- Specified by:
isUserInRole
in interfacejavax.ws.rs.core.SecurityContext
-
isSecure
public boolean isSecure()- Specified by:
isSecure
in interfacejavax.ws.rs.core.SecurityContext
-
getAuthenticationScheme
- Specified by:
getAuthenticationScheme
in interfacejavax.ws.rs.core.SecurityContext
-