org.springframework.security.oauth.consumer
Class BaseProtectedResourceDetails

java.lang.Object
  extended by org.springframework.security.oauth.consumer.BaseProtectedResourceDetails
All Implemented Interfaces:
ProtectedResourceDetails

public class BaseProtectedResourceDetails
extends Object
implements ProtectedResourceDetails

Basic implementation of protected resource details.

Author:
Ryan Heaton

Constructor Summary
BaseProtectedResourceDetails()
           
 
Method Summary
 String getAccessTokenHttpMethod()
          The HTTP method to use with getAccessTokenURL()
 String getAccessTokenURL()
          The URL to use to obtain an OAuth access token.
 Map<String,String> getAdditionalParameters()
          The additional OAuth parameters for this protected resource.
 Map<String,String> getAdditionalRequestHeaders()
          The additional request headers to send.
 String getAuthorizationHeaderRealm()
          The value of the realm of the authorization header, or null if none.
 String getConsumerKey()
          The consumer key with which to interact with the provider.
 String getId()
          An identifier for these resource details.
 String getRequestTokenHttpMethod()
          The HTTP method to use with getRequestTokenURL()
 String getRequestTokenURL()
          The URL to use to obtain an OAuth request token.
 SignatureSecret getSharedSecret()
          The shared signature secret.
 String getSignatureMethod()
          The signature method to use for OAuth requests.
 String getUserAuthorizationURL()
          The URL to which to redirect the user for authorization of access to the protected resource.
 boolean isAcceptsAuthorizationHeader()
          Whether the provider of this resource accepts the OAuth Authorization HTTP header.
 boolean isUse10a()
          Whether to use OAuth Core 1.0a.
 void setAcceptsAuthorizationHeader(boolean acceptsAuthorizationHeader)
           
 void setAccessTokenHttpMethod(String accessTokenHttpMethod)
           
 void setAccessTokenURL(String accessTokenURL)
           
 void setAdditionalParameters(Map<String,String> additionalParameters)
           
 void setAdditionalRequestHeaders(Map<String,String> additionalRequestHeaders)
           
 void setAuthorizationHeaderRealm(String authorizationHeaderRealm)
           
 void setConsumerKey(String consumerKey)
           
 void setId(String id)
           
 void setRequestTokenHttpMethod(String requestTokenHttpMethod)
           
 void setRequestTokenURL(String requestTokenURL)
           
 void setSharedSecret(SignatureSecret sharedSecret)
           
 void setSignatureMethod(String signatureMethod)
           
 void setUse10a(boolean use10a)
           
 void setUserAuthorizationURL(String userAuthorizationURL)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseProtectedResourceDetails

public BaseProtectedResourceDetails()
Method Detail

getId

public String getId()
Description copied from interface: ProtectedResourceDetails
An identifier for these resource details.

Specified by:
getId in interface ProtectedResourceDetails
Returns:
An identifier for these resource details.

setId

public void setId(String id)

getConsumerKey

public String getConsumerKey()
Description copied from interface: ProtectedResourceDetails
The consumer key with which to interact with the provider.

Specified by:
getConsumerKey in interface ProtectedResourceDetails
Returns:
The consumer key with which to interact with the provider.

setConsumerKey

public void setConsumerKey(String consumerKey)

getSignatureMethod

public String getSignatureMethod()
Description copied from interface: ProtectedResourceDetails
The signature method to use for OAuth requests.

Specified by:
getSignatureMethod in interface ProtectedResourceDetails
Returns:
The signature method to use for OAuth requests.

setSignatureMethod

public void setSignatureMethod(String signatureMethod)

getSharedSecret

public SignatureSecret getSharedSecret()
Description copied from interface: ProtectedResourceDetails
The shared signature secret.

Specified by:
getSharedSecret in interface ProtectedResourceDetails
Returns:
The shared signature secret.

setSharedSecret

public void setSharedSecret(SignatureSecret sharedSecret)

getRequestTokenURL

public String getRequestTokenURL()
Description copied from interface: ProtectedResourceDetails
The URL to use to obtain an OAuth request token.

Specified by:
getRequestTokenURL in interface ProtectedResourceDetails
Returns:
The URL to use to obtain an OAuth request token.

setRequestTokenURL

public void setRequestTokenURL(String requestTokenURL)

getRequestTokenHttpMethod

public String getRequestTokenHttpMethod()
Description copied from interface: ProtectedResourceDetails
The HTTP method to use with getRequestTokenURL()

Specified by:
getRequestTokenHttpMethod in interface ProtectedResourceDetails
Returns:
the HTTP method to use with getRequestTokenURL()

setRequestTokenHttpMethod

public void setRequestTokenHttpMethod(String requestTokenHttpMethod)

getUserAuthorizationURL

public String getUserAuthorizationURL()
Description copied from interface: ProtectedResourceDetails
The URL to which to redirect the user for authorization of access to the protected resource.

Specified by:
getUserAuthorizationURL in interface ProtectedResourceDetails
Returns:
The URL to which to redirect the user for authorization of access to the protected resource.

setUserAuthorizationURL

public void setUserAuthorizationURL(String userAuthorizationURL)

getAccessTokenURL

public String getAccessTokenURL()
Description copied from interface: ProtectedResourceDetails
The URL to use to obtain an OAuth access token.

Specified by:
getAccessTokenURL in interface ProtectedResourceDetails
Returns:
The URL to use to obtain an OAuth access token.

setAccessTokenURL

public void setAccessTokenURL(String accessTokenURL)

getAccessTokenHttpMethod

public String getAccessTokenHttpMethod()
Description copied from interface: ProtectedResourceDetails
The HTTP method to use with getAccessTokenURL()

Specified by:
getAccessTokenHttpMethod in interface ProtectedResourceDetails
Returns:
the HTTP method to use with getAccessTokenURL()

setAccessTokenHttpMethod

public void setAccessTokenHttpMethod(String accessTokenHttpMethod)

isAcceptsAuthorizationHeader

public boolean isAcceptsAuthorizationHeader()
Description copied from interface: ProtectedResourceDetails
Whether the provider of this resource accepts the OAuth Authorization HTTP header. Default: true.

Specified by:
isAcceptsAuthorizationHeader in interface ProtectedResourceDetails
Returns:
Whether the provider of this resource accepts the OAuth Authorization HTTP header.

setAcceptsAuthorizationHeader

public void setAcceptsAuthorizationHeader(boolean acceptsAuthorizationHeader)

getAuthorizationHeaderRealm

public String getAuthorizationHeaderRealm()
Description copied from interface: ProtectedResourceDetails
The value of the realm of the authorization header, or null if none.

Specified by:
getAuthorizationHeaderRealm in interface ProtectedResourceDetails
Returns:
The value of the realm of the authorization header

setAuthorizationHeaderRealm

public void setAuthorizationHeaderRealm(String authorizationHeaderRealm)

isUse10a

public boolean isUse10a()
Description copied from interface: ProtectedResourceDetails
Whether to use OAuth Core 1.0a.

Specified by:
isUse10a in interface ProtectedResourceDetails
Returns:
Whether to use OAuth Core 1.0a.

setUse10a

public void setUse10a(boolean use10a)

getAdditionalParameters

public Map<String,String> getAdditionalParameters()
Description copied from interface: ProtectedResourceDetails
The additional OAuth parameters for this protected resource.

Specified by:
getAdditionalParameters in interface ProtectedResourceDetails
Returns:
The additional OAuth parameters for this protected resource, or null if none.

setAdditionalParameters

public void setAdditionalParameters(Map<String,String> additionalParameters)

getAdditionalRequestHeaders

public Map<String,String> getAdditionalRequestHeaders()
Description copied from interface: ProtectedResourceDetails
The additional request headers to send.

Specified by:
getAdditionalRequestHeaders in interface ProtectedResourceDetails
Returns:
The additional request headers to send.

setAdditionalRequestHeaders

public void setAdditionalRequestHeaders(Map<String,String> additionalRequestHeaders)


Copyright © 2012. All Rights Reserved.