pub struct ClientMetadata {
pub redirect_uris: Vec<String>,
pub token_endpoint_auth_method: Option<String>,
pub grant_types: Option<Vec<String>>,
pub response_types: Option<Vec<String>>,
pub client_name: Option<String>,
pub scope: Option<String>,
pub software_statement: Option<String>,
}Expand description
RFC 7591 section 2 client metadata: the registration request body, and the echoed half of the section 3.2.1 client information response.
Only the members this server actually acts on are modelled. RFC 7591 section 2 requires a
server to IGNORE metadata it does not understand, which is what serde’s default handling of
unknown fields does here, so a client that sends logo_uri is not refused for it.
Fields§
§redirect_uris: Vec<String>Redirection URIs (RFC 6749 section 3.1.2). REQUIRED for a client registering the authorization code grant, since that grant has nowhere to deliver a code without one.
token_endpoint_auth_method: Option<String>How the client will authenticate at the token endpoint. Omitted means
client_secret_basic, which is the default RFC 7591 section 2 states.
grant_types: Option<Vec<String>>The grants this client will use. OMITTED (None) means ["authorization_code"]
(section 2), which is why this is an Option rather than a Vec that is empty when
absent: section 2 gives omission a meaning, and an explicitly empty list means the opposite
of that meaning. Collapsing the two would make {"grant_types": []} silently register the
authorization code grant.
response_types: Option<Vec<String>>The authorization response types this client will use. Omitted (None) means ["code"]
(section 2); see ClientMetadata::grant_types for why this is an Option.
client_name: Option<String>Human-readable name, shown to a resource owner. ATTACKER-CHOSEN when registration is open: it is echoed into this crate’s device verification page, which escapes it, and any host consent screen must do the same.
scope: Option<String>The space-delimited scope list (RFC 6749 section 3.3) this client may request.
software_statement: Option<String>RFC 7591 section 2.3. NOT evaluated by this server, and its presence is a refusal rather than an omission: see the module docs.
Trait Implementations§
Source§impl Clone for ClientMetadata
impl Clone for ClientMetadata
Source§fn clone(&self) -> ClientMetadata
fn clone(&self) -> ClientMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more