flwr_oauth2/jwk
Types
Some of the more common algorithms used for JWKS, but can be extended
pub type Algorithm {
RS256
ES256
PS256
HS256
None
OtherAlgorithm(value: String)
}
Constructors
-
RS256 -
ES256 -
PS256 -
HS256 -
None -
OtherAlgorithm(value: String)
pub type JsonWebKey {
JsonWebKey(
key: Key,
public_key_use: option.Option(PublicKeyUse),
key_ops: List(KeyOperation),
alg: option.Option(Algorithm),
kid: option.Option(String),
x5u: option.Option(uri.Uri),
x5c: List(String),
x5t: option.Option(String),
x5t_s256: option.Option(String),
)
}
Constructors
-
JsonWebKey( key: Key, public_key_use: option.Option(PublicKeyUse), key_ops: List(KeyOperation), alg: option.Option(Algorithm), kid: option.Option(String), x5u: option.Option(uri.Uri), x5c: List(String), x5t: option.Option(String), x5t_s256: option.Option(String), )
pub type Key {
RsaKey(n: String, e: String)
EcKey(crv: String, x: String, y: String)
OctKey(k: String)
OtherKey(kty: String)
}
Constructors
-
RsaKey(n: String, e: String) -
EcKey(crv: String, x: String, y: String) -
OctKey(k: String) -
OtherKey(kty: String)
pub type KeyOperation {
Sign
Verify
Encrypt
Decrypt
WrapKey
UnwrapKey
DeriveKey
DeriveBits
OtherKeyOperation(value: String)
}
Constructors
-
Sign -
Verify -
Encrypt -
Decrypt -
WrapKey -
UnwrapKey -
DeriveKey -
DeriveBits -
OtherKeyOperation(value: String)
Corresponds to the kty (Key Type) Parameter Values
pub type PublicKeyUse {
Signature
Encryption
OtherUse(value: String)
}
Constructors
-
Signature -
Encryption -
OtherUse(value: String)
Values
pub fn json_web_key_decoder() -> decode.Decoder(JsonWebKey)
pub fn json_web_key_to_json(
json_web_key: JsonWebKey,
) -> json.Json
pub fn jwk_set_decoder() -> decode.Decoder(JwkSet)