public final class Signer extends Object
SignatureBuilder and create an Authorization| Constructor and Description |
|---|
Signer() |
Signer(Keychain keychain) |
Signer(Keychain keychain,
KeyIdentifier keyIdentifier) |
| Modifier and Type | Method and Description |
|---|---|
Keychain |
getCandidateKeys() |
Keychain |
getKeychain() |
KeyIdentifier |
getKeyIdentifier() |
boolean |
rotateKeys()
Call this method to rotate the candidate keys back to the original state.
|
boolean |
rotateKeys(Challenge nextChallenge)
Call this method to rotate the candidate keys according to the provided
Challenge. |
boolean |
rotateKeys(Challenge nextChallenge,
Authorization failedAuthz)
Call this method to rotate the candidate keys
|
Authorization |
sign(SignatureBuilder signatureBuilder)
Signs a
SignatureBuilder and returns an Authorization header |
public Signer()
public Signer(Keychain keychain)
public Signer(Keychain keychain, KeyIdentifier keyIdentifier)
public Keychain getCandidateKeys()
Challenge-filtered and rotated KeychainrotateKeys()public KeyIdentifier getKeyIdentifier()
public boolean rotateKeys()
public boolean rotateKeys(Challenge nextChallenge)
Challenge.nextChallenge - the Challenge header which was returned for the previous failed request.public boolean rotateKeys(Challenge nextChallenge, Authorization failedAuthz)
nextChallenge - the Challenge header which was returned for the previous failed request.failedAuthz - the Authorization header which failed on the previous request.public Authorization sign(SignatureBuilder signatureBuilder)
SignatureBuilder and returns an Authorization headersignatureBuilder - the Request containing the headers to be signedAuthorization header or null if no identities could sign the ChallengeCopyright © 2013. All Rights Reserved.