public class OAuthRsaSha1Signer extends java.lang.Object implements OAuthSigner
Constructor and Description |
---|
OAuthRsaSha1Signer()
Constructor for
OAuthRsaSha1Signer . |
OAuthRsaSha1Signer(byte[] privateKeyBytes)
Sets the RSA-SHA1 private key object used to sign this request.
|
OAuthRsaSha1Signer(java.security.PrivateKey privateKey)
Sets the RSA-SHA1 private key object used to sign this request.
|
OAuthRsaSha1Signer(java.lang.String privateKeyString)
Sets the RSA-SHA1 private key object used to sign this request.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getSignature(java.lang.String baseString,
OAuthParameters oauthParameters)
Signs the input string using the appropriate signature method.
|
java.lang.String |
getSignatureMethod()
Gets the signature method for this specific implementation.
|
void |
setPrivateKey(java.security.PrivateKey privateKey)
Sets the
PrivateKey used to sign requests. |
public OAuthRsaSha1Signer()
OAuthRsaSha1Signer
. This form of the constructor
does not set the private key, so be sure to call
setPrivateKey(PrivateKey)
before signing requests.public OAuthRsaSha1Signer(java.security.PrivateKey privateKey) throws OAuthException
privateKey
- the PrivateKey
to use to initialize
the signer.OAuthException
- if setting the private key failspublic OAuthRsaSha1Signer(java.lang.String privateKeyString) throws OAuthException
privateKeyString
- the Base-64 encoded private key string conforming
to the PKCS #8 standard.OAuthException
- if setting the private key failspublic OAuthRsaSha1Signer(byte[] privateKeyBytes) throws OAuthException
privateKeyBytes
- the Base-64 encoded private key conforming to the
PKCS #8 standard.OAuthException
- if setting the private key failspublic void setPrivateKey(java.security.PrivateKey privateKey) throws OAuthException
PrivateKey
used to sign requests.privateKey
- OAuthException
- if the private key is null.public java.lang.String getSignature(java.lang.String baseString, OAuthParameters oauthParameters) throws OAuthException
OAuthSigner
getSignature
in interface OAuthSigner
baseString
- the string to signoauthParameters
- the parameters related to the OAuth request or
null
OAuthException
- if signing the request failspublic java.lang.String getSignatureMethod()
OAuthSigner
getSignatureMethod
in interface OAuthSigner