Trait openidconnect::JsonWebKey [−][src]
pub trait JsonWebKey<JS, JT, JU>: Clone + Debug + DeserializeOwned + Serialize + 'static where
JS: JwsSigningAlgorithm<JT>,
JT: JsonWebKeyType,
JU: JsonWebKeyUse, { fn key_id(&self) -> Option<&JsonWebKeyId>; fn key_type(&self) -> &JT; fn key_use(&self) -> Option<&JU>; fn new_symmetric(key: Vec<u8>) -> Self; fn verify_signature(
&self,
signature_alg: &JS,
message: &[u8],
signature: &[u8]
) -> Result<(), SignatureVerificationError>; }
Expand description
JSON Web Key.
Required methods
fn key_id(&self) -> Option<&JsonWebKeyId>
fn key_id(&self) -> Option<&JsonWebKeyId>
Returns the key ID, or None
if no key ID is specified.
Returns the allowed key usage (e.g., signing or encryption), or None
if no usage is
specified.
fn new_symmetric(key: Vec<u8>) -> Self
fn new_symmetric(key: Vec<u8>) -> Self
Initializes a new symmetric key or shared signing secret from the specified raw bytes.