Package de.msi.oauth.flow.signature
Interface SignatureMethod
- All Known Subinterfaces:
HmacSha1Signature,PlainTextSignature,RsaSha1Signature,de.msi.oauth.flow.signature.SignedTextSignature
- All Known Implementing Classes:
HmacSha1Signature.DefaultHmacSha1Signature,PlainTextSignature.DefaultPlainTextSignature,RsaSha1Signature.DefaultRsaSha1Signature,de.msi.oauth.flow.signature.SignedTextSignature.DefaultSignedTextSignature
public interface SignatureMethod
This functionality refers to the different ways of sign requests within the
OAuth authentication process.- Author:
- Martin Siegemund
- See Also:
- Signing Requests
-
Method Summary
Modifier and Type Method Description ConsumerSecretconsumerSecret()Retrieve theconsumer secretwhich is bound to a specific service provider<R, E extends Exception>
Rhandle(SignatureMethodHandler<R,E> handler)Handle thisSignatureMethodin a typesafe way by providing aSignatureMethodHandler.SignatureMethodNameoAuthName()Retrieve the name of the signature method.Signaturesignature(SignatureParams params)Generate the signature.
-
Method Details
-
oAuthName
SignatureMethodName oAuthName()Retrieve the name of the signature method.- Returns:
- the name
-
consumerSecret
ConsumerSecret consumerSecret()Retrieve theconsumer secretwhich is bound to a specific service provider- Returns:
- the
consumer secret
-
signature
Generate the signature.- Parameters:
params- theSignatureParamswhich are required by thisSignatureMethodto generate the signature- Returns:
- the signature
-
handle
<R, E extends Exception> R handle(SignatureMethodHandler<R,E> handler) throws E extends ExceptionHandle thisSignatureMethodin a typesafe way by providing aSignatureMethodHandler.- Type Parameters:
R- the desired return values typeE- the type of exception which is allowed to be thrown- Parameters:
handler- theSignatureMethodHandler- Returns:
- the result of the handling process
- Throws:
E- if a failure occurred while handling theSignatureMethodE extends Exception
-