Class PlaintextMethod
java.lang.Object
org.glassfish.jersey.oauth1.signature.PlaintextMethod
- All Implemented Interfaces:
OAuth1SignatureMethod
An OAuth signature method that implements Plaintext.
- Author:
- Paul C. Bryan
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionname()Returns the name of this signature method, as negotiated through the OAuth protocol.sign(String baseString, OAuth1Secrets secrets) Generates the PLAINTEXT signature.booleanverify(String elements, OAuth1Secrets secrets, String signature) Verifies the Plaintext signature.
-
Field Details
-
NAME
Method name.- See Also:
-
-
Constructor Details
-
PlaintextMethod
public PlaintextMethod()
-
-
Method Details
-
name
Description copied from interface:OAuth1SignatureMethodReturns the name of this signature method, as negotiated through the OAuth protocol.- Specified by:
namein interfaceOAuth1SignatureMethod- Returns:
- Signature method name.
-
sign
Generates the PLAINTEXT signature.- Specified by:
signin interfaceOAuth1SignatureMethod- Parameters:
baseString- the OAuth elements to sign (ignored).secrets- the shared secrets used to sign the request.- Returns:
- the plaintext OAuth signature.
-
verify
Verifies the Plaintext signature.- Specified by:
verifyin interfaceOAuth1SignatureMethod- Parameters:
elements- OAuth elements (ignored).secrets- the shared secrets for verifying the signature.signature- plaintext OAuth signature to be verified.- Returns:
- true if the signature matches the secrets and data.
-