public static class DefaultOAuthProvider.Consumer extends java.lang.Object implements OAuthConsumer
OAuthConsumer.| Modifier and Type | Method and Description |
|---|---|
MultivaluedMap<java.lang.String,java.lang.String> |
getAttributes()
Returns additional attributes associated with the consumer (e.g.
|
java.lang.String |
getKey()
Returns consumer key.
|
java.lang.String |
getOwner()
Returns identifier of owner of this consumer - i.e.
|
java.security.Principal |
getPrincipal()
Returns a
Principal object representing this consumer. |
java.lang.String |
getSecret()
Returns consumer secret.
|
boolean |
isInRole(java.lang.String role)
Returns a boolean indicating whether this consumer is authorized for the
specified logical "role".
|
public java.lang.String getKey()
OAuthConsumergetKey in interface OAuthConsumerpublic java.lang.String getSecret()
OAuthConsumergetSecret in interface OAuthConsumerpublic java.lang.String getOwner()
public MultivaluedMap<java.lang.String,java.lang.String> getAttributes()
public java.security.Principal getPrincipal()
OAuthConsumerPrincipal object representing this consumer.
When the oauth filter verifies the request
and no access token is provided, this is the principal that will get set to the security context.
This can be used for 2-legged oauth. If the server does not allow consumers acting
on their own (with no access token), this method should return null.getPrincipal in interface OAuthConsumerpublic boolean isInRole(java.lang.String role)
OAuthConsumerSecurityContext.isUserInRole(java.lang.String) to this
method.isInRole in interface OAuthConsumerrole - a String specifying the name of the roleboolean indicating whether this token is authorized for
a given roleCopyright © 2016 Oracle Corporation. All Rights Reserved.