+10
crates/atproto-xrpcs/src/authorization.rs
+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
26
+
impl Authorization {
27
27
+
/// identity returns the optional issuer claim of the authorization structure.
28
28
+
pub fn identity(&self) -> Option<&str> {
29
29
+
if self.3 {
30
30
+
return self.1.jose.issuer.as_deref();
31
31
+
}
32
32
+
None
33
33
+
}
34
34
+
}
35
35
+
26
36
impl<S> OptionalFromRequestParts<S> for Authorization
27
37
where
28
38
S: Send + Sync,