pub struct OAuthClientRegistration { /* private fields */ }Expand description
Client credentials selected or created for an authorization-code flow.
bound_issuer() is set for pre-registered and
dynamically registered clients. Client ID Metadata Document identifiers are
portable across authorization servers and therefore have no issuer binding.
The serialized representation includes client_secret so persistent store
implementations can round-trip credentials. Treat it as sensitive data and
only serialize it into an appropriately protected secret store.
Implementations§
Source§impl OAuthClientRegistration
impl OAuthClientRegistration
Sourcepub fn pre_registered(
issuer: impl Into<String>,
client_id: impl Into<String>,
client_secret: Option<String>,
) -> Self
pub fn pre_registered( issuer: impl Into<String>, client_id: impl Into<String>, client_secret: Option<String>, ) -> Self
Create issuer-bound pre-registered client credentials.
Sourcepub fn dynamically_registered(
issuer: impl Into<String>,
client_id: impl Into<String>,
client_secret: Option<String>,
) -> Self
pub fn dynamically_registered( issuer: impl Into<String>, client_id: impl Into<String>, client_secret: Option<String>, ) -> Self
Restore issuer-bound credentials obtained by Dynamic Client Registration.
Applications normally receive this form from
resolve_oauth_client_registration_with_store. This constructor lets
a persistent OAuthClientRegistrationStore rebuild a registration
from separately stored fields without relying on a particular
serialization format.
Sourcepub fn client_id_metadata_document(client_id: impl Into<String>) -> Self
pub fn client_id_metadata_document(client_id: impl Into<String>) -> Self
Create a portable Client ID Metadata Document registration.
Sourcepub fn client_secret(&self) -> Option<&str>
pub fn client_secret(&self) -> Option<&str>
OAuth client secret, when the registration issued one.
Sourcepub fn method(&self) -> OAuthClientRegistrationMethod
pub fn method(&self) -> OAuthClientRegistrationMethod
Registration mechanism used to obtain the client ID.
Sourcepub fn bound_issuer(&self) -> Option<&str>
pub fn bound_issuer(&self) -> Option<&str>
Authorization-server issuer to which these credentials are bound.
This is None only for portable Client ID Metadata Document URLs.
Trait Implementations§
Source§impl Clone for OAuthClientRegistration
impl Clone for OAuthClientRegistration
Source§fn clone(&self) -> OAuthClientRegistration
fn clone(&self) -> OAuthClientRegistration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OAuthClientRegistration
impl Debug for OAuthClientRegistration
Source§impl<'de> Deserialize<'de> for OAuthClientRegistration
impl<'de> Deserialize<'de> for OAuthClientRegistration
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>,
impl Eq for OAuthClientRegistration
Source§impl PartialEq for OAuthClientRegistration
impl PartialEq for OAuthClientRegistration
Source§impl Serialize for OAuthClientRegistration
impl Serialize for OAuthClientRegistration
impl StructuralPartialEq for OAuthClientRegistration
Auto Trait Implementations§
impl Freeze for OAuthClientRegistration
impl RefUnwindSafe for OAuthClientRegistration
impl Send for OAuthClientRegistration
impl Sync for OAuthClientRegistration
impl Unpin for OAuthClientRegistration
impl UnsafeUnpin for OAuthClientRegistration
impl UnwindSafe for OAuthClientRegistration
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<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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.