pub trait JwkEncoder {
    fn alg(&self) -> Option<KeyAlg>;
    fn add_str(&mut self, key: &str, value: &str) -> Result<(), Error>;
    fn add_as_base64(&mut self, key: &str, value: &[u8]) -> Result<(), Error>;
    fn mode(&self) -> JwkEncoderMode;

    fn is_public(&self) -> bool { ... }
    fn is_secret(&self) -> bool { ... }
    fn is_thumbprint(&self) -> bool { ... }
}
Expand description

Common interface for JWK encoders

Required Methods

Get the requested algorithm for the JWK

Add a string attribute

Add a binary attribute to be encoded as unpadded base64-URL

Accessor for the encoder mode

Provided Methods

Check if the mode is public

Check if the mode is secret

Check if the mode is thumbprint

Implementors