pub trait OidcBackend: Send + Sync {
// Required methods
fn metadata_documents(&self) -> Vec<MetadataDocument>;
fn jwks(&self) -> MetadataDocument;
fn userinfo<'life0, 'life1, 'async_trait>(
&'life0 self,
bearer: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Value>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn userinfo_path(&self) -> String { ... }
}Expand description
Backing for the stateless OIDC surface the proxy hosts.
The proxy owns the HTTP routes (discovery, JWKS, userinfo); the embedder
supplies their content from its own key/client metadata. No authorize /
token here: those are stateful and out of scope for the data plane.
Required Methods§
Sourcefn metadata_documents(&self) -> Vec<MetadataDocument>
fn metadata_documents(&self) -> Vec<MetadataDocument>
Static metadata documents to serve as GET routes, e.g. the
openid-configuration and any provider-specific discovery document.
Sourcefn jwks(&self) -> MetadataDocument
fn jwks(&self) -> MetadataDocument
The JWKS document and the path it is advertised at.
Sourcefn userinfo<'life0, 'life1, 'async_trait>(
&'life0 self,
bearer: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn userinfo<'life0, 'life1, 'async_trait>(
&'life0 self,
bearer: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve UserInfo claims for a bearer token. None yields 401.
bearer is always a present, non-empty token (the Bearer prefix
already stripped): a request with no credentials is rejected with a
401 Bearer challenge before this method is called, so implementations
never receive an empty string.
Provided Methods§
Sourcefn userinfo_path(&self) -> String
fn userinfo_path(&self) -> String
The path of the UserInfo endpoint. Defaults to /userinfo.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".