+10
crates/atproto-xrpcs/src/authorization.rs
+10
crates/atproto-xrpcs/src/authorization.rs
···
23
#[derive(Clone)]
24
pub struct Authorization(pub Header, pub Claims, pub String, pub bool);
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
+
36
impl<S> OptionalFromRequestParts<S> for Authorization
37
where
38
S: Send + Sync,