- java.lang.Object
-
- swim.security.JsonWebSignature
-
-
Field Summary
Fields Modifier and Type Field Description protected Data
payloadData
protected Value
protectedHeader
protected Data
signatureData
protected Data
signingInput
protected Value
unprotectedHeader
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
algorithm()
String
contentType()
static JsonWebSignature
create(Data protectedHeaderData, Data payloadData, Data signatureData)
static JsonWebSignature
create(Data signingInput, Data protectedHeaderData, Data payloadData, Data signatureData)
static JsonWebSignature
create(Value unprotectedHeader, Data protectedHeaderData, Data payloadData, Data signatureData)
static JsonWebSignature
create(Value unprotectedHeader, Data signingInput, Data protectedHeaderData, Data payloadData, Data signatureData)
HashTrieSet<String>
critical()
<T> Output<T>
debug(Output<T> output)
Writes a developer readable, debug-formatted string representation of this object tooutput
.boolean
equals(Object other)
Value
get(String name)
int
hashCode()
static JsonWebSignature
hmacSHA(Key symmetricKey, Value unprotectedHeader, Value protectedHeader, Data payloadData)
static JsonWebSignature
hmacSHA(Mac mac, Key symmetricKey, Value unprotectedHeader, Value protectedHeader, Data payloadData)
static JsonWebSignature
hmacSHA(Mac mac, Key symmetricKey, Value unprotectedHeader, Value protectedHeader, Data signingInput, Data payloadData)
JsonWebKey
jsonWebKey()
String
jsonWebKeySetUrl()
String
keyId()
static JsonWebSignature
mac(Key symmetricKey, Data payloadData)
static JsonWebSignature
mac(Key symmetricKey, Value protectedHeader, Data payloadData)
static JsonWebSignature
mac(Key symmetricKey, Value unprotectedHeader, Value protectedHeader, Data payloadData)
static JsonWebSignature
parse(String jws)
static Parser<JsonWebSignature>
parser()
Value
payload()
<T> T
payload(Decoder<T> decoder)
<T> T
payload(Form<T> form)
Data
payloadData()
Value
protectedHeader()
static JsonWebSignature
sign(PrivateKey privateKey, Data payloadData)
static JsonWebSignature
sign(PrivateKey privateKey, Value protectedHeader, Data payloadData)
static JsonWebSignature
sign(PrivateKey privateKey, Value unprotectedHeader, Value protectedHeader, Data payloadData)
Data
signatureData()
static JsonWebSignature
signECDSA(PrivateKey privateKey, Value unprotectedHeader, Value protectedHeader, Data payloadData)
static JsonWebSignature
signECDSA(Signature signature, PrivateKey privateKey, int keyLength, Value unprotectedHeader, Value protectedHeader, Data payloadData)
static JsonWebSignature
signECDSA(Signature signature, PrivateKey privateKey, int keyLength, Value unprotectedHeader, Value protectedHeader, Data signingInput, Data payloadData)
Data
signingInput()
static JsonWebSignature
signRSA(PrivateKey privateKey, Value unprotectedHeader, Value protectedHeader, Data payloadData)
static JsonWebSignature
signRSA(Signature signature, PrivateKey privateKey, int keyLength, Value unprotectedHeader, Value protectedHeader, Data payloadData)
static JsonWebSignature
signRSA(Signature signature, PrivateKey privateKey, int keyLength, Value unprotectedHeader, Value protectedHeader, Data signingInput, Data payloadData)
String
toJws()
String
toString()
String
type()
Value
unprotectedHeader()
JsonWebSignature
unprotectedHeader(Value unprotectedHeader)
boolean
verifyECDSASignature(Signature signature, PublicKey publicKey)
boolean
verifyMac(Key symmetricKey)
boolean
verifyMac(Mac mac, Key symmetricKey)
boolean
verifyRSASignature(Signature signature, PublicKey publicKey)
boolean
verifySignature(PublicKey publicKey)
Writer<?,JsonWebSignature>
writeJws(Output<?> output)
FingerTrieSeq<String>
x509CertificateChain()
String
x509Sha1Thumbprint()
String
x509Sha256Thumbprint()
String
x509Url()
-
-
-
Method Detail
-
unprotectedHeader
public final Value unprotectedHeader()
-
unprotectedHeader
public JsonWebSignature unprotectedHeader(Value unprotectedHeader)
-
protectedHeader
public final Value protectedHeader()
-
signingInput
public final Data signingInput()
-
payloadData
public final Data payloadData()
-
payload
public final <T> T payload(Decoder<T> decoder)
-
payload
public final <T> T payload(Form<T> form)
-
payload
public final Value payload()
-
signatureData
public final Data signatureData()
-
algorithm
public String algorithm()
-
jsonWebKeySetUrl
public String jsonWebKeySetUrl()
-
jsonWebKey
public JsonWebKey jsonWebKey()
-
keyId
public String keyId()
-
x509Url
public String x509Url()
-
x509CertificateChain
public FingerTrieSeq<String> x509CertificateChain()
-
x509Sha1Thumbprint
public String x509Sha1Thumbprint()
-
x509Sha256Thumbprint
public String x509Sha256Thumbprint()
-
type
public String type()
-
contentType
public String contentType()
-
critical
public HashTrieSet<String> critical()
-
verifyMac
public boolean verifyMac(Key symmetricKey)
-
verifySignature
public boolean verifySignature(PublicKey publicKey)
-
writeJws
public Writer<?,JsonWebSignature> writeJws(Output<?> output)
-
toJws
public String toJws()
-
debug
public <T> Output<T> debug(Output<T> output)
Description copied from interface:Debug
Writes a developer readable, debug-formatted string representation of this object tooutput
.
-
create
public static JsonWebSignature create(Value unprotectedHeader, Data signingInput, Data protectedHeaderData, Data payloadData, Data signatureData)
-
create
public static JsonWebSignature create(Data signingInput, Data protectedHeaderData, Data payloadData, Data signatureData)
-
create
public static JsonWebSignature create(Value unprotectedHeader, Data protectedHeaderData, Data payloadData, Data signatureData)
-
create
public static JsonWebSignature create(Data protectedHeaderData, Data payloadData, Data signatureData)
-
hmacSHA
public static JsonWebSignature hmacSHA(Mac mac, Key symmetricKey, Value unprotectedHeader, Value protectedHeader, Data signingInput, Data payloadData)
-
hmacSHA
public static JsonWebSignature hmacSHA(Mac mac, Key symmetricKey, Value unprotectedHeader, Value protectedHeader, Data payloadData)
-
hmacSHA
public static JsonWebSignature hmacSHA(Key symmetricKey, Value unprotectedHeader, Value protectedHeader, Data payloadData)
-
mac
public static JsonWebSignature mac(Key symmetricKey, Value unprotectedHeader, Value protectedHeader, Data payloadData)
-
mac
public static JsonWebSignature mac(Key symmetricKey, Value protectedHeader, Data payloadData)
-
mac
public static JsonWebSignature mac(Key symmetricKey, Data payloadData)
-
signRSA
public static JsonWebSignature signRSA(Signature signature, PrivateKey privateKey, int keyLength, Value unprotectedHeader, Value protectedHeader, Data signingInput, Data payloadData)
-
signRSA
public static JsonWebSignature signRSA(Signature signature, PrivateKey privateKey, int keyLength, Value unprotectedHeader, Value protectedHeader, Data payloadData)
-
signRSA
public static JsonWebSignature signRSA(PrivateKey privateKey, Value unprotectedHeader, Value protectedHeader, Data payloadData)
-
signECDSA
public static JsonWebSignature signECDSA(Signature signature, PrivateKey privateKey, int keyLength, Value unprotectedHeader, Value protectedHeader, Data signingInput, Data payloadData)
-
signECDSA
public static JsonWebSignature signECDSA(Signature signature, PrivateKey privateKey, int keyLength, Value unprotectedHeader, Value protectedHeader, Data payloadData)
-
signECDSA
public static JsonWebSignature signECDSA(PrivateKey privateKey, Value unprotectedHeader, Value protectedHeader, Data payloadData)
-
sign
public static JsonWebSignature sign(PrivateKey privateKey, Value unprotectedHeader, Value protectedHeader, Data payloadData)
-
sign
public static JsonWebSignature sign(PrivateKey privateKey, Value protectedHeader, Data payloadData)
-
sign
public static JsonWebSignature sign(PrivateKey privateKey, Data payloadData)
-
parser
public static Parser<JsonWebSignature> parser()
-
parse
public static JsonWebSignature parse(String jws)
-
-