pub struct OidcDiscoveryDoc {
pub authorization_endpoint: String,
pub token_endpoint: String,
pub userinfo_endpoint: Option<String>,
pub jwks_uri: Option<String>,
pub issuer: String,
pub token_endpoint_auth_methods_supported: Vec<String>,
}Expand description
Fields we extract from an OIDC provider’s
/.well-known/openid-configuration document. Everything else is
ignored — pylon’s auth flow only uses these.
Fields§
§token_endpoint: String§userinfo_endpoint: Option<String>§jwks_uri: Option<String>§issuer: String§token_endpoint_auth_methods_supported: Vec<String>Per OIDC Discovery: when present, lists the auth methods the
token endpoint accepts. When omitted the OIDC default is
client_secret_basic (NOT client_secret_post!) — getting
this wrong silently breaks every IdP that follows the spec.
Implementations§
Source§impl OidcDiscoveryDoc
impl OidcDiscoveryDoc
Sourcepub fn parse(json: &str) -> Result<Self, String>
pub fn parse(json: &str) -> Result<Self, String>
Parse a discovery JSON blob. Returns the relevant fields or an error if the doc is missing required endpoints.
Sourcepub fn into_spec(self) -> DiscoveredSpec
pub fn into_spec(self) -> DiscoveredSpec
Convert into a runtime DiscoveredSpec using OIDC-standard
scopes + parser. Token-exchange shape is selected from the
discovered token_endpoint_auth_methods_supported:
client_secret_post→TokenExchangeShape::Standard- everything else (including the spec default of
client_secret_basic) →TokenExchangeShape::BasicAuth
Trait Implementations§
Source§impl Clone for OidcDiscoveryDoc
impl Clone for OidcDiscoveryDoc
Source§fn clone(&self) -> OidcDiscoveryDoc
fn clone(&self) -> OidcDiscoveryDoc
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OidcDiscoveryDoc
impl Debug for OidcDiscoveryDoc
Source§impl<'de> Deserialize<'de> for OidcDiscoveryDoc
impl<'de> Deserialize<'de> for OidcDiscoveryDoc
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
Auto Trait Implementations§
impl Freeze for OidcDiscoveryDoc
impl RefUnwindSafe for OidcDiscoveryDoc
impl Send for OidcDiscoveryDoc
impl Sync for OidcDiscoveryDoc
impl Unpin for OidcDiscoveryDoc
impl UnsafeUnpin for OidcDiscoveryDoc
impl UnwindSafe for OidcDiscoveryDoc
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