Struct matrix_sdk::oidc::registrations::OidcRegistrations
source · 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(
base_path: &str,
metadata: VerifiedClientMetadata,
static_registrations: HashMap<Url, ClientId>
) -> Result<Self, OidcRegistrationsError>
pub fn new( base_path: &str, metadata: VerifiedClientMetadata, static_registrations: HashMap<Url, ClientId> ) -> Result<Self, OidcRegistrationsError>
Creates a new registration store.
§Arguments
-
base_path
- A directory where the registrations file can be stored. It will be nested inside of a directory calledoidc
asregistrations.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 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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§fn clone_handle(handle: Handle) -> Handle
fn clone_handle(handle: Handle) -> Handle
§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>