pub struct Config {
pub issuer_url: IssuerUrl,
pub client_id: ClientId,
pub client_secret: ClientSecret,
pub redirect_url: RedirectUrl,
pub idp_logout_url: Option<String>,
}
Expand description
Middleware configuration.
Fields§
§issuer_url: IssuerUrl
Issuer URL used to A) retrieve the OpenID Connect provider metadata and B) validate that tokens are generated by the expected issuer.
client_id: ClientId
Our Client ID, as generated by the OpenID Connect provider.
client_secret: ClientSecret
Our Client Secret, as generated by the OpenID Connect provider.
redirect_url: RedirectUrl
URL to which the OpenID Connect provider will redirect authenticated requests; must be a URL registered with the provider.
idp_logout_url: Option<String>
Optional URL used to log the user out of the identity provider as part of the application logout process. If provided, the browser will be redirected to this URL after clearing the auth info from the Tide session.
Note that most Identity Providers allow you to include a provider-specific query parameter in this URL. The browser will be redirected to that URL after the logout process has been completed and the provider’s credentials have been cleared from the browser.
You should almost certainly populate that query parameter so
that the user ends up at your site after the logout. In most
cases the value of this parameter will be the full URL to your
site’s
logout_landing_path
.
Finally, identity providers often require you to register the logout URL in their configuration, usually in the same place where you register your redirect URL.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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>,
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more