pub struct OidcProvider {
pub issuer: String,
pub authorization_endpoint: String,
pub token_endpoint: String,
pub jwks_uri: String,
pub userinfo_endpoint: Option<String>,
pub end_session_endpoint: Option<String>,
}Available on crate feature
sso only.Expand description
Endpoint URLs for an OIDC / OAuth 2.0 identity provider.
Fields§
§issuer: String§token_endpoint: String§jwks_uri: String§userinfo_endpoint: Option<String>§end_session_endpoint: Option<String>Implementations§
Source§impl OidcProvider
impl OidcProvider
Sourcepub fn discover(issuer: &str) -> Result<OidcProvider, SsoError>
pub fn discover(issuer: &str) -> Result<OidcProvider, SsoError>
Fetch and parse {issuer}/.well-known/openid-configuration.
Sourcepub fn google() -> OidcProvider
pub fn google() -> OidcProvider
Google OIDC preset.
Sourcepub fn microsoft(tenant_id: &str) -> OidcProvider
pub fn microsoft(tenant_id: &str) -> OidcProvider
Microsoft Azure AD / Entra ID preset.
tenant_id can be a GUID, "common", "organizations", or "consumers".
Sourcepub fn github() -> OidcProvider
pub fn github() -> OidcProvider
GitHub OAuth 2.0 preset.
GitHub is not a full OIDC provider — it does not issue JWTs, so
jwks_uri is empty and user info is fetched from the /user API.
Sourcepub fn okta(domain: &str) -> OidcProvider
pub fn okta(domain: &str) -> OidcProvider
Okta preset.
domain is your Okta org URL, e.g. "dev-12345.okta.com".
Sourcepub fn auth0(domain: &str) -> OidcProvider
pub fn auth0(domain: &str) -> OidcProvider
Auth0 preset.
domain is your Auth0 domain, e.g. "myapp.us.auth0.com".
Sourcepub fn keycloak(base_url: &str, realm: &str) -> OidcProvider
pub fn keycloak(base_url: &str, realm: &str) -> OidcProvider
Keycloak preset.
base_url is the root URL of your Keycloak instance, e.g.
"https://keycloak.example.com". realm is the realm name.
Trait Implementations§
Source§impl Clone for OidcProvider
impl Clone for OidcProvider
Source§fn clone(&self) -> OidcProvider
fn clone(&self) -> OidcProvider
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OidcProvider
impl RefUnwindSafe for OidcProvider
impl Send for OidcProvider
impl Sync for OidcProvider
impl Unpin for OidcProvider
impl UnsafeUnpin for OidcProvider
impl UnwindSafe for OidcProvider
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ServiceExt for T
impl<T> ServiceExt for T
Source§fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
fn map_response_body<F>(self, f: F) -> MapResponseBody<Self, F>where
Self: Sized,
Available on crate feature
map-response-body only.Apply a transformation to the response body. Read more
Source§fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
fn trace_for_http(self) -> Trace<Self, SharedClassifier<ServerErrorsAsFailures>>where
Self: Sized,
Available on crate feature
trace only.High level tracing that classifies responses using HTTP status codes. Read more
Source§fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
fn trace_for_grpc(self) -> Trace<Self, SharedClassifier<GrpcErrorsAsFailures>>where
Self: Sized,
Available on crate feature
trace only.High level tracing that classifies responses using gRPC headers. Read more