Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleJWK examples
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

...