Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jersey.oauth.signature
Interface OAuthSignatureMethod

All Known Implementing Classes:
  HMAC_SHA1, PLAINTEXT, RSA_SHA1

    public interface OAuthSignatureMethod

An interface representing the OAuth signature method. Concrete implementations are loaded through a service loader.

Author:
  Hubert A. Le Van Gong , Paul C. Bryan

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)` Signs the data using the supplied secret(s).
`boolean` | `verify(java.lang.String elements, OAuthSecrets secrets, java.lang.String signature)` Verifies the signature for the data using the supplied secret(s).

Method Detail

### name

    java.lang.String name()

  Returns the name of this signature method, as negotiated through the OAuth protocol.

### sign

    java.lang.String sign(java.lang.String elements,
                          OAuthSecrets secrets)
                          throws InvalidSecretException

  Signs the data using the supplied secret(s).

  Parameters:
    `elements` - a `String` that contains the request elements to be signed.
    `secrets` - the secret(s) to use to sign the data.
  Returns:
    a `String` that contains the signature.
  Throws:
    `InvalidSecretException` - if a supplied secret is not valid.

### verify

    boolean verify(java.lang.String elements,
                   OAuthSecrets secrets,
                   java.lang.String signature)
                   throws InvalidSecretException

  Verifies the signature for the data using the supplied secret(s).

  Parameters:
    `elements` - a `String` that contains the request elements to be verified.
    `secrets` - the secret(s) to use to verify the signature.
    `signature` - a `String` that contains the signature to be verified.
  Returns:
    true if the signature matches the secrets and data.
  Throws:
    `InvalidSecretException` - if a supplied secret is not valid.

Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2011 Oracle Corporation. All Rights Reserved.