+11
crates/atproto-xrpcs/src/authorization.rs
+11
crates/atproto-xrpcs/src/authorization.rs
···
20
20
///
21
21
/// Contains JWT header, validated claims, original token, and validation status.
22
22
/// Resolves DID documents via the configured identity resolver.
23
23
+
#[derive(Clone)]
23
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
+
}
24
35
25
36
impl<S> OptionalFromRequestParts<S> for Authorization
26
37
where