com.sun.jersey.oauth.signature
Class PLAINTEXT

java.lang.Object
  extended by com.sun.jersey.oauth.signature.PLAINTEXT
All Implemented Interfaces:
OAuthSignatureMethod

public class PLAINTEXT
extends Object
implements OAuthSignatureMethod

An OAuth signature method that implements PLAINTEXT.

Author:
Paul C. Bryan

Field Summary
static String NAME
           
 
Constructor Summary
PLAINTEXT()
           
 
Method Summary
 String name()
          Returns the name of this signature method, as negotiated through the OAuth protocol.
 String sign(String elements, OAuthSecrets secrets)
          Generates the PLAINTEXT signature.
 boolean verify(String elements, OAuthSecrets secrets, String signature)
          Verifies the PLAINTEXT signature.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final String NAME
See Also:
Constant Field Values
Constructor Detail

PLAINTEXT

public PLAINTEXT()
Method Detail

name

public String name()
Description copied from interface: OAuthSignatureMethod
Returns the name of this signature method, as negotiated through the OAuth protocol.

Specified by:
name in interface OAuthSignatureMethod

sign

public String sign(String elements,
                   OAuthSecrets secrets)
Generates the PLAINTEXT signature.

Specified by:
sign in interface OAuthSignatureMethod
Parameters:
elements - the OAuth elements to sign (ignored).
secrets - the shared secrets used to sign the request.
Returns:
the plaintext OAuth signature.

verify

public boolean verify(String elements,
                      OAuthSecrets secrets,
                      String signature)
Verifies the PLAINTEXT signature.

Specified by:
verify in interface OAuthSignatureMethod
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.


Copyright © 2013 Oracle Corporation. All Rights Reserved.