pub struct KeySet {
pub keys: Vec<Arc<Key>>,
}Expand description
JWK Set to spec https://datatracker.ietf.org/doc/html/rfc7517#section-5
Fields§
§keys: Vec<Arc<Key>>Vec of an arbitrary number of Json Web Keys
Implementations§
Source§impl KeySet
impl KeySet
pub fn from_str(s: &str) -> Result<Self>
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self>
pub fn to_str(&self) -> Result<String>
pub fn to_file<P: AsRef<Path>>(&self, path: P) -> Result<()>
pub fn to_public_set(&self) -> Result<KeySet>
pub fn find_key(&self, kid: &str) -> Option<Arc<Key>>
pub fn find_supported_key(&self, operation: &KeyOperation) -> Option<Arc<Key>>
pub fn encode(&self, payload: &Claims) -> Result<String>
pub fn decode(&self, token: &str) -> Result<Claims>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for KeySet
impl<'de> Deserialize<'de> for KeySet
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for KeySet
impl RefUnwindSafe for KeySet
impl Send for KeySet
impl Sync for KeySet
impl Unpin for KeySet
impl UnwindSafe for KeySet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more