|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.adamcin.httpsig.api.Signer
public final class Signer
Instance of a Signer, used by an HTTP client to sign a RequestContent and create an Authorization
| Constructor Summary | |
|---|---|
Signer(Keychain keychain)
|
|
Signer(Keychain keychain,
KeyId keyId)
|
|
Signer(Key singleKey,
KeyId keyId)
|
|
| Method Summary | |
|---|---|
Keychain |
getCandidateKeys()
|
Keychain |
getKeychain()
|
KeyId |
getKeyId()
|
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(RequestContent requestContent)
Signs a RequestContent and returns an Authorization header. |
Authorization |
sign(RequestContent requestContent,
List<String> electiveHeaders)
Signs a RequestContent and returns an Authorization header. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Signer(Keychain keychain)
public Signer(Key singleKey,
KeyId keyId)
public Signer(Keychain keychain,
KeyId keyId)
| Method Detail |
|---|
public Keychain getKeychain()
Signerpublic Keychain getCandidateKeys()
Challenge-filtered and rotated KeychainrotateKeys()public KeyId getKeyId()
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(RequestContent requestContent)
RequestContent and returns an Authorization header. The signature will use
all headers included in the RequestContent.
requestContent - the Request containing the headers to be signed
Authorization header or null if no identities could sign the RequestContent
public Authorization sign(RequestContent requestContent,
List<String> electiveHeaders)
RequestContent and returns an Authorization header.
requestContent - the Request containing the headers to be signedelectiveHeaders - a list of headers to include in the signature, beyond those required by
the Challenge
Authorization header or null if no identities could sign the RequestContent
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||