pub struct Discovery {
pub issuer: String,
pub authorization_endpoint: String,
pub token_endpoint: String,
pub jwks_uri: String,
pub userinfo_endpoint: Option<String>,
pub token_endpoint_auth_methods_supported: Option<Vec<String>>,
}Expand description
The parts of /.well-known/openid-configuration isb uses.
Fields§
§issuer: String§token_endpoint: String§jwks_uri: String§userinfo_endpoint: Option<String>§token_endpoint_auth_methods_supported: Option<Vec<String>>Implementations§
Source§impl Discovery
impl Discovery
Sourcepub fn parse(body: &[u8], configured_issuer: &str) -> Result<Discovery, String>
pub fn parse(body: &[u8], configured_issuer: &str) -> Result<Discovery, String>
Parse and check a discovery document against the configured issuer: the issuer must match (a trailing slash aside) and every endpoint must be https (or loopback http, for tests and local providers).
Sourcepub fn prefers_post(&self) -> bool
pub fn prefers_post(&self) -> bool
client_secret_basic unless the provider only lists
client_secret_post (basic is the default when nothing is listed).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Discovery
impl<'de> Deserialize<'de> for Discovery
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 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