pub struct Issuer(/* private fields */);Expand description
The OIDC issuer identifier (iss claim).
Obtained from crate::oidc::Claims::iss. Backed by url::Url,
consistent with crate::oidc::OpenIdConfiguration::issuer, which
enables direct comparison between the two.
§Example
use loopauth::oidc;
use url::Url;
let json = serde_json::json!({
"sub": "user123",
"iss": "https://accounts.example.com",
"aud": ["client-id"],
"iat": 1_000_000_000_u64,
"exp": 9_999_999_999_u64
});
let claims: oidc::Claims = serde_json::from_value(json).unwrap();
let iss = claims.iss();
assert_eq!(iss.as_url(), &Url::parse("https://accounts.example.com").unwrap());Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Issuer
impl<'de> Deserialize<'de> for Issuer
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
impl Eq for Issuer
impl StructuralPartialEq for Issuer
Auto Trait Implementations§
impl Freeze for Issuer
impl RefUnwindSafe for Issuer
impl Send for Issuer
impl Sync for Issuer
impl Unpin for Issuer
impl UnsafeUnpin for Issuer
impl UnwindSafe for Issuer
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.