THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
InputStream is = JsonWebKeyTest.class.getResourceAsStream(fileName); JsonWebKeys keySet = JwkUtils.readJwkSet(is); JsonWebKey key = keySet.getKey("Public RSA Key"); String thumbprint = JwkUtils.getThumbprint(key); assertEquals("NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9Xs", thumbprint); KeyType keyType = key.getKeyType(); assertEquals(KeyType.RSA, thumbprintkeyType); |
JsonWebKeys
...
also
...
supports
...
the
...
retrieval
...
of
...
keys
...
by
...
their
...
type
...
(RSA,
...
EC,
...
Octet)
...
and
...
operation
...
(ENCRYPT,
...
SIGN,
...
etc).
...
Once
...
you
...
have
...
JWK
...
loaded
...
it
...
is
...
typically
...
submitted
...
to
...
JWS
...
or
...
JWE
...
providers.
JWS Signature
JWS (JSON Web Signature) document describes how a document content can be signed. For example, Appendix A1 shows how the content can be signed with an HMAC key
...