#[non_exhaustive]pub struct Discovery {
pub issuer: Url,
pub authorization_endpoint: Url,
pub token_endpoint: Url,
pub jwks_uri: Url,
pub userinfo_endpoint: Option<Url>,
pub end_session_endpoint: Option<Url>,
}Expand description
OIDC discovery document — minimal subset an RP cares about.
PAS publishes a richer document, but the RP needs only these
fields. Adding a field is one pub line + serde annotation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.issuer: Url§token_endpoint: Url§jwks_uri: Url§userinfo_endpoint: Option<Url>§end_session_endpoint: Option<Url>OIDC RP-Initiated Logout 1.0 §2 — the OP end_session_endpoint.
None when the OP advertises no RP-initiated logout support
(the field is OPTIONAL in OIDC discovery).
Implementations§
Source§impl Discovery
impl Discovery
Sourcepub fn for_test(
issuer: Url,
authorization_endpoint: Url,
token_endpoint: Url,
jwks_uri: Url,
) -> Discovery
pub fn for_test( issuer: Url, authorization_endpoint: Url, token_endpoint: Url, jwks_uri: Url, ) -> Discovery
Test-support constructor — bypasses the wire-deserialization
path for tests that bypass fetch_discovery.
Sourcepub fn with_end_session_endpoint(self, endpoint: Url) -> Discovery
pub fn with_end_session_endpoint(self, endpoint: Url) -> Discovery
Test-support: set the end_session_endpoint (RP-Initiated Logout).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Discovery
impl<'de> Deserialize<'de> for Discovery
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Discovery, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Discovery, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Discovery
impl RefUnwindSafe for Discovery
impl Send for Discovery
impl Sync for Discovery
impl Unpin for Discovery
impl UnsafeUnpin for Discovery
impl UnwindSafe for Discovery
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