JOSEUtils.JWKS (jose_utils v0.4.0) View Source
Convenience function to work with JWK sets
Link to this section Summary
Functions
Returns the keys suitable for decryption from a JWK set
Returns the keys suitable for encryption from a JWK set
Filters the JWKS using a key selector t:JWK.key_selector/0
Returns the keys suitable for signature from a JWK set
Returns the keys suitable for signature verification from a JWK set
Link to this section Types
Specs
t() :: [JOSEUtils.JWK.t()]
Link to this section Functions
Specs
decryption_keys( t(), alg_or_algs :: JOSEUtils.JWA.enc_alg() | [JOSEUtils.JWA.enc_alg()] | nil, enc_or_encs :: JOSEUtils.JWA.enc_enc() | [JOSEUtils.JWA.enc_enc()] | nil ) :: t()
Returns the keys suitable for decryption from a JWK set
Specs
encryption_keys( t(), alg_or_algs :: JOSEUtils.JWA.enc_alg() | [JOSEUtils.JWA.enc_alg()] | nil, enc_or_encs :: JOSEUtils.JWA.enc_enc() | [JOSEUtils.JWA.enc_enc()] | nil ) :: t()
Returns the keys suitable for encryption from a JWK set
Specs
filter(t(), JOSEUtils.JWK.key_selector()) :: t()
Filters the JWKS using a key selector t:JWK.key_selector/0
Specs
signature_keys( t(), alg_or_algs :: JOSEUtils.JWA.sig_alg() | [JOSEUtils.JWA.sig_alg()] | nil ) :: t()
Returns the keys suitable for signature from a JWK set
Note that it does not return the keys suitable only for signature verification.
MAC keys are considered signature keys, and are returned as well.
Specs
verification_keys( t(), alg_or_algs :: JOSEUtils.JWA.sig_alg() | [JOSEUtils.JWA.sig_alg()] | nil ) :: t()
Returns the keys suitable for signature verification from a JWK set
MAC keys are considered verification keys, and are returned as well.