pub struct OAuthClientMetadata {
pub client_id: String,
pub client_type: ClientType,
pub redirect_uris: Vec<String>,
pub allowed_scopes: HashSet<String>,
pub name: Option<String>,
pub description: Option<String>,
pub registered_at: SystemTime,
}Expand description
Public metadata for a registered OAuth client.
This is the administrative read model returned by OAuthServer::get_client
and OAuthServer::list_clients. It deliberately has no client-credential
field: a confidential client’s secret is available only to the registration
flow that creates or receives the OAuthClient.
Fields§
§client_id: StringUnique client identifier.
client_type: ClientTypeClient credential classification.
redirect_uris: Vec<String>Allowed redirect URIs.
allowed_scopes: HashSet<String>Allowed scopes.
name: Option<String>Client name (for display).
description: Option<String>Client description.
registered_at: SystemTimeWhen the client was registered.
Implementations§
Source§impl OAuthClientMetadata
impl OAuthClientMetadata
Sourcepub fn validate_redirect_uri(&self, uri: &str) -> bool
pub fn validate_redirect_uri(&self, uri: &str) -> bool
Validates that a redirect URI is allowed for this client.
Sourcepub fn validate_scopes(&self, scopes: &[String]) -> bool
pub fn validate_scopes(&self, scopes: &[String]) -> bool
Validates that the requested scopes are allowed for this client.
Trait Implementations§
Source§impl Clone for OAuthClientMetadata
impl Clone for OAuthClientMetadata
Source§fn clone(&self) -> OAuthClientMetadata
fn clone(&self) -> OAuthClientMetadata
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 moreSource§impl Debug for OAuthClientMetadata
impl Debug for OAuthClientMetadata
impl Eq for OAuthClientMetadata
Source§impl From<&OAuthClient> for OAuthClientMetadata
impl From<&OAuthClient> for OAuthClientMetadata
Source§fn from(client: &OAuthClient) -> Self
fn from(client: &OAuthClient) -> Self
Converts to this type from the input type.
Source§impl PartialEq for OAuthClientMetadata
impl PartialEq for OAuthClientMetadata
impl StructuralPartialEq for OAuthClientMetadata
Auto Trait Implementations§
impl Freeze for OAuthClientMetadata
impl RefUnwindSafe for OAuthClientMetadata
impl Send for OAuthClientMetadata
impl Sync for OAuthClientMetadata
impl Unpin for OAuthClientMetadata
impl UnsafeUnpin for OAuthClientMetadata
impl UnwindSafe for OAuthClientMetadata
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<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
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).