public final class RsaSha1Method extends Object implements OAuth1SignatureMethod
Constructor and Description |
---|
RsaSha1Method() |
Modifier and Type | Method and Description |
---|---|
String |
name()
Returns the name of this signature method, as negotiated through the
OAuth protocol.
|
String |
sign(String baseString,
OAuth1Secrets secrets)
Generates the RSA-SHA1 signature of OAuth request elements.
|
boolean |
verify(String elements,
OAuth1Secrets secrets,
String signature)
Verifies the RSA-SHA1 signature of OAuth request elements.
|
public static final String NAME
public String name()
OAuth1SignatureMethod
name
in interface OAuth1SignatureMethod
public String sign(String baseString, OAuth1Secrets secrets) throws InvalidSecretException
sign
in interface OAuth1SignatureMethod
baseString
- the combined OAuth elements to sign.secrets
- the secrets object containing the private key for generating the signature.InvalidSecretException
- if the supplied secret is not valid.public boolean verify(String elements, OAuth1Secrets secrets, String signature) throws InvalidSecretException
verify
in interface OAuth1SignatureMethod
elements
- OAuth elements signature is to be verified against.secrets
- the secrets object containing the public key for verifying the signature.signature
- base64-encoded OAuth signature to be verified.InvalidSecretException
- if the supplied secret is not valid.Copyright © 2007-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.