pub struct ClientMetadata {
pub application_type: ApplicationType,
pub grant_types: Vec<OAuthGrantType>,
pub client_uri: Localized<Url>,
pub client_name: Option<Localized<String>>,
pub logo_uri: Option<Localized<Url>>,
pub policy_uri: Option<Localized<Url>>,
pub tos_uri: Option<Localized<Url>>,
}
Expand description
The metadata necessary to register a client with an OAuth 2.0 authorization server.
This is a simplified type, designed to avoid inconsistencies between fields. Only the fields defined in MSC2966 can be set with this type, and only if different values are supported by this API. To set other fields, use your own type or construct directly the JSON representation.
The original format is defined in RFC 7591.
Fields§
§application_type: ApplicationType
The type of the application.
grant_types: Vec<OAuthGrantType>
The grant types that the client will use at the token endpoint.
This should match the login methods that the client can use.
client_uri: Localized<Url>
URL of the home page of the client.
client_name: Option<Localized<String>>
Name of the client to be presented to the end-user during authorization.
logo_uri: Option<Localized<Url>>
URL that references a logo for the client application.
policy_uri: Option<Localized<Url>>
URL that the client provides to the end-user to read about the how the profile data will be used.
tos_uri: Option<Localized<Url>>
URL that the client provides to the end-user to read about the client’s terms of service.
Implementations§
Source§impl ClientMetadata
impl ClientMetadata
Sourcepub fn new(
application_type: ApplicationType,
grant_types: Vec<OAuthGrantType>,
client_uri: Localized<Url>,
) -> Self
pub fn new( application_type: ApplicationType, grant_types: Vec<OAuthGrantType>, client_uri: Localized<Url>, ) -> Self
Construct a ClientMetadata
with only the required fields.
Trait Implementations§
Source§impl Clone for ClientMetadata
impl Clone for ClientMetadata
Source§fn clone(&self) -> ClientMetadata
fn clone(&self) -> ClientMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ClientMetadata
impl Debug for ClientMetadata
Auto Trait Implementations§
impl Freeze for ClientMetadata
impl RefUnwindSafe for ClientMetadata
impl Send for ClientMetadata
impl Sync for ClientMetadata
impl Unpin for ClientMetadata
impl UnwindSafe for ClientMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
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