#[non_exhaustive]pub struct OAuthDynamicClientRegistration {
pub client_name: String,
pub application_type: OAuthApplicationType,
pub redirect_uris: Vec<String>,
pub grant_types: Vec<String>,
pub response_types: Vec<String>,
pub token_endpoint_auth_method: String,
}Expand description
Dynamic Client Registration request metadata.
Use native() for desktop, mobile, CLI, and localhost
clients, as required by the MCP 2026-07-28 authorization specification.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.client_name: StringHuman-readable client name.
application_type: OAuthApplicationTypeOIDC application type. MCP clients must choose this explicitly.
redirect_uris: Vec<String>Allowed redirect URIs.
grant_types: Vec<String>Requested OAuth grant types.
response_types: Vec<String>Requested OAuth response types.
token_endpoint_auth_method: StringToken endpoint authentication method.
Implementations§
Source§impl OAuthDynamicClientRegistration
impl OAuthDynamicClientRegistration
Sourcepub fn native(
client_name: impl Into<String>,
redirect_uris: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn native( client_name: impl Into<String>, redirect_uris: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Create registration metadata for a native application.
Sourcepub fn web(
client_name: impl Into<String>,
redirect_uris: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn web( client_name: impl Into<String>, redirect_uris: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Create registration metadata for a web application.
Sourcepub fn grant_types(
self,
grant_types: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn grant_types( self, grant_types: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Override the requested grant types.
Sourcepub fn token_endpoint_auth_method(self, method: impl Into<String>) -> Self
pub fn token_endpoint_auth_method(self, method: impl Into<String>) -> Self
Override the token endpoint authentication method.
Trait Implementations§
Source§impl Clone for OAuthDynamicClientRegistration
impl Clone for OAuthDynamicClientRegistration
Source§fn clone(&self) -> OAuthDynamicClientRegistration
fn clone(&self) -> OAuthDynamicClientRegistration
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 moreAuto Trait Implementations§
impl Freeze for OAuthDynamicClientRegistration
impl RefUnwindSafe for OAuthDynamicClientRegistration
impl Send for OAuthDynamicClientRegistration
impl Sync for OAuthDynamicClientRegistration
impl Unpin for OAuthDynamicClientRegistration
impl UnsafeUnpin for OAuthDynamicClientRegistration
impl UnwindSafe for OAuthDynamicClientRegistration
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
Mutably borrows from an owned value. Read more