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 java.lang.Object
implements OAuthSignatureMethod

An OAuth signature method that implements PLAINTEXT.

Author:
Paul C. Bryan

Field Summary
static java.lang.String NAME
           
 
Constructor Summary
PLAINTEXT()
           
 
Method Summary
 java.lang.String name()
          Returns the name of this signature method, as negotiated through the OAuth protocol.
 java.lang.String sign(java.lang.String elements, OAuthSecrets secrets)
          Generates the PLAINTEXT signature.
 boolean verify(java.lang.String elements, OAuthSecrets secrets, java.lang.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 java.lang.String NAME
See Also:
Constant Field Values
Constructor Detail

PLAINTEXT

public PLAINTEXT()
Method Detail

name

public java.lang.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 java.lang.String sign(java.lang.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(java.lang.String elements,
                      OAuthSecrets secrets,
                      java.lang.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 © 2011 Sun Microsystems, Inc. All Rights Reserved.