org.springframework.security.oauth.common.signature
Class CoreOAuthSignatureMethodFactory

java.lang.Object
  extended by org.springframework.security.oauth.common.signature.CoreOAuthSignatureMethodFactory
All Implemented Interfaces:
OAuthSignatureMethodFactory

public class CoreOAuthSignatureMethodFactory
extends Object
implements OAuthSignatureMethodFactory

Implements the signatures defined in OAuth Core 1.0. By default, PLAINTEXT signatures are not supported

Author:
Ryan Heaton

Constructor Summary
CoreOAuthSignatureMethodFactory()
           
 
Method Summary
 org.springframework.security.authentication.encoding.PasswordEncoder getPlainTextPasswordEncoder()
          The password encoder to use for the plain-text password signature method.
 OAuthSignatureMethod getSignatureMethod(String methodName, SignatureSecret signatureSecret, String tokenSecret)
          Get the signature method of the given name.
 boolean isSupportHMAC_SHA1()
          Whether to support HMAC-SHA1 signature method.
 boolean isSupportPlainText()
          Whether to support the plain text signature method.
 boolean isSupportRSA_SHA1()
          Whether to support RSA-SHA1 signature method.
 void setPlainTextPasswordEncoder(org.springframework.security.authentication.encoding.PasswordEncoder plainTextPasswordEncoder)
          The password encoder to use for the plain-text password signature method.
 void setSupportHMAC_SHA1(boolean supportHMAC_SHA1)
          Whether to support HMAC-SHA1 signature method.
 void setSupportPlainText(boolean supportPlainText)
          Whether to support the plain text signature method.
 void setSupportRSA_SHA1(boolean supportRSA_SHA1)
          Whether to support RSA-SHA1 signature method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoreOAuthSignatureMethodFactory

public CoreOAuthSignatureMethodFactory()
Method Detail

getSignatureMethod

public OAuthSignatureMethod getSignatureMethod(String methodName,
                                               SignatureSecret signatureSecret,
                                               String tokenSecret)
                                        throws UnsupportedSignatureMethodException
Description copied from interface: OAuthSignatureMethodFactory
Get the signature method of the given name.

Specified by:
getSignatureMethod in interface OAuthSignatureMethodFactory
Parameters:
methodName - The method name.
signatureSecret - The signature secret.
tokenSecret - The token secret.
Returns:
the signature method.
Throws:
UnsupportedSignatureMethodException - If the specified signature method name isn't recognized or supported.

isSupportPlainText

public boolean isSupportPlainText()
Whether to support the plain text signature method.

Returns:
Whether to support the plain text signature method.

setSupportPlainText

public void setSupportPlainText(boolean supportPlainText)
Whether to support the plain text signature method.

Parameters:
supportPlainText - Whether to support the plain text signature method.

isSupportHMAC_SHA1

public boolean isSupportHMAC_SHA1()
Whether to support HMAC-SHA1 signature method.

Returns:
Whether to support HMAC-SHA1 signature method.

setSupportHMAC_SHA1

public void setSupportHMAC_SHA1(boolean supportHMAC_SHA1)
Whether to support HMAC-SHA1 signature method.

Parameters:
supportHMAC_SHA1 - Whether to support HMAC-SHA1 signature method.

isSupportRSA_SHA1

public boolean isSupportRSA_SHA1()
Whether to support RSA-SHA1 signature method.

Returns:
Whether to support RSA-SHA1 signature method.

setSupportRSA_SHA1

public void setSupportRSA_SHA1(boolean supportRSA_SHA1)
Whether to support RSA-SHA1 signature method.

Parameters:
supportRSA_SHA1 - Whether to support RSA-SHA1 signature method.

getPlainTextPasswordEncoder

public org.springframework.security.authentication.encoding.PasswordEncoder getPlainTextPasswordEncoder()
The password encoder to use for the plain-text password signature method.

Returns:
The password encoder to use for the plain-text password signature method.

setPlainTextPasswordEncoder

public void setPlainTextPasswordEncoder(org.springframework.security.authentication.encoding.PasswordEncoder plainTextPasswordEncoder)
The password encoder to use for the plain-text password signature method.

Parameters:
plainTextPasswordEncoder - The password encoder to use for the plain-text password signature method.


Copyright © 2012. All Rights Reserved.