|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.server.oauth1.DefaultOAuth1Provider.Token
public class DefaultOAuth1Provider.Token
Simple immutable implementation of OAuth1Token.
| Constructor Summary | |
|---|---|
|
DefaultOAuth1Provider.Token(String token,
String secret,
DefaultOAuth1Provider.Token requestToken)
|
|
DefaultOAuth1Provider.Token(String token,
String secret,
String consumerKey,
String callbackUrl,
Map<String,List<String>> attributes)
|
protected |
DefaultOAuth1Provider.Token(String token,
String secret,
String consumerKey,
String callbackUrl,
Principal principal,
Set<String> roles,
javax.ws.rs.core.MultivaluedMap<String,String> attributes)
|
| Method Summary | |
|---|---|
protected DefaultOAuth1Provider.Token |
authorize(Principal principal,
Set<String> roles)
Authorizes this token - i.e. |
javax.ws.rs.core.MultivaluedMap<String,String> |
getAttributes()
Returns additional custom attributes associated with the token. |
String |
getCallbackUrl()
Returns callback URL for this token (applicable just to request tokens) |
OAuth1Consumer |
getConsumer()
Returns consumer this token was issued for. |
Principal |
getPrincipal()
Returns a Principal object containing the name of the
user the request containing this token is authorized to act on behalf of. |
String |
getSecret()
Returns the token secret. |
String |
getToken()
Returns string representing the token. |
boolean |
isInRole(String role)
Returns a boolean indicating whether this token is authorized for the specified logical "role". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected DefaultOAuth1Provider.Token(String token,
String secret,
String consumerKey,
String callbackUrl,
Principal principal,
Set<String> roles,
javax.ws.rs.core.MultivaluedMap<String,String> attributes)
public DefaultOAuth1Provider.Token(String token,
String secret,
String consumerKey,
String callbackUrl,
Map<String,List<String>> attributes)
public DefaultOAuth1Provider.Token(String token,
String secret,
DefaultOAuth1Provider.Token requestToken)
| Method Detail |
|---|
public String getToken()
OAuth1Token
getToken in interface OAuth1Tokenpublic String getSecret()
OAuth1Token
getSecret in interface OAuth1Tokenpublic OAuth1Consumer getConsumer()
OAuth1Token
getConsumer in interface OAuth1Tokenpublic javax.ws.rs.core.MultivaluedMap<String,String> getAttributes()
OAuth1TokenOAuth1Provider.newRequestToken(String, String, java.util.Map)
method that created this request token. If this is an access token,
this is any application defined set that will included as form parameters
in a response to accessToken request.
getAttributes in interface OAuth1Tokenpublic Principal getPrincipal()
OAuth1TokenPrincipal object containing the name of the
user the request containing this token is authorized to act on behalf of.
When the oauth filter verifies the request
with this token is properly authenticated, it injects this token into a security context
which then delegates SecurityContext.getUserPrincipal() to this
method.
getPrincipal in interface OAuth1Tokenpublic boolean isInRole(String role)
OAuth1TokenSecurityContext.isUserInRole(String) to this
method.
isInRole in interface OAuth1Tokenrole - a String specifying the name of the role
boolean indicating whether this token is authorized for
a given rolepublic String getCallbackUrl()
protected DefaultOAuth1Provider.Token authorize(Principal principal,
Set<String> roles)
principal - Principal to add to the token.roles - Roles to add to the token.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||