A library for ATProtocol identities.

feature: authorization identity helper method

Changed files
+10
crates
atproto-xrpcs
+10
crates/atproto-xrpcs/src/authorization.rs
··· 23 23 #[derive(Clone)] 24 24 pub struct Authorization(pub Header, pub Claims, pub String, pub bool); 25 25 26 + impl Authorization { 27 + /// identity returns the optional issuer claim of the authorization structure. 28 + pub fn identity(&self) -> Option<&str> { 29 + if self.3 { 30 + return self.1.jose.issuer.as_deref(); 31 + } 32 + None 33 + } 34 + } 35 + 26 36 impl<S> OptionalFromRequestParts<S> for Authorization 27 37 where 28 38 S: Send + Sync,