pub struct OidcRegistrations { /* private fields */ }
experimental-oidc
only.Expand description
The data needed to restore an OpenID Connect session.
Implementations§
Source§impl OidcRegistrations
impl OidcRegistrations
Manages the storage of OIDC registrations.
Sourcepub fn new(
registrations_file: &Path,
metadata: VerifiedClientMetadata,
static_registrations: HashMap<Url, ClientId>,
) -> Result<Self, OidcRegistrationsError>
pub fn new( registrations_file: &Path, metadata: VerifiedClientMetadata, static_registrations: HashMap<Url, ClientId>, ) -> Result<Self, OidcRegistrationsError>
Creates a new registration store.
§Arguments
-
registrations_file
- A file path where the registrations will be stored. This previously took a directory and stored the registrations with the pathsupplied_directory/oidc/registrations.json
. -
metadata
- The metadata used to register the client. If this changes, any stored registrations will be lost so the client can re-register with the new data. -
static_registrations
- Pre-configured registrations for use with issuers that don’t support dynamic client registration.
Sourcepub fn client_id(&self, issuer: &Url) -> Option<ClientId>
pub fn client_id(&self, issuer: &Url) -> Option<ClientId>
Returns the client ID registered for a particular issuer or None if a registration hasn’t been made.
Sourcepub fn set_and_write_client_id(
&self,
client_id: ClientId,
issuer: Url,
) -> Result<(), OidcRegistrationsError>
pub fn set_and_write_client_id( &self, client_id: ClientId, issuer: Url, ) -> Result<(), OidcRegistrationsError>
Stores a new client ID registration for a particular issuer. If a client ID has already been stored, this will overwrite the old value.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OidcRegistrations
impl RefUnwindSafe for OidcRegistrations
impl Send for OidcRegistrations
impl Sync for OidcRegistrations
impl Unpin for OidcRegistrations
impl UnwindSafe for OidcRegistrations
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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