|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface OAuthToken
Interface representing an OAuth token (i.e. access token or request token).
Method Summary | |
---|---|
MultivaluedMap<String,String> |
getAttributes()
Returns additional custom attributes associated with the token. |
OAuthConsumer |
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". |
Method Detail |
---|
String getToken()
String getSecret()
OAuthConsumer getConsumer()
MultivaluedMap<String,String> getAttributes()
OAuthProvider#newRequestToken(java.lang.String, java.lang.String, javax.ws.rs.core.MultivaluedMap)
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.
Principal getPrincipal()
Principal
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.
boolean isInRole(String role)
SecurityContext.isUserInRole(java.lang.String)
to this
method.
role
- a String
specifying the name of the role
boolean
indicating whether this token is authorized for
a given role
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |