#[non_exhaustive]pub enum ApplicationType {
Native,
Web,
}Expand description
OpenID Connect’s application_type client metadata value.
SEP-837 makes an MCP client MUST specify this at Dynamic Client
Registration: “Omitting it defaults to web under OIDC, which can conflict
with native-style redirect URIs; non-OIDC servers safely ignore the
parameter.”
#[non_exhaustive] because OpenID Connect permits an authorization server
to define further values, and adding a variant to an exhaustive public enum
is a MAJOR semver break.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Native
Desktop applications, mobile apps, CLI tools, and locally-hosted web
applications reached over loopback. Registered as "native".
Web
Remote, browser-based applications served from a non-local host.
Registered as "web".
Implementations§
Source§impl ApplicationType
impl ApplicationType
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The exact wire value, from OpenID Connect Dynamic Client Registration
§2.
These two strings are compatibility surface, not an implementation
detail. An authorization server that receives an unrecognised value
treats it as absent and silently falls back to the OIDC web default,
so a change from "native" to "Native" would break registration for
every native client while failing no round trip and no serialization
test. They are pinned by hand in tests/oauth_application_type.rs.
§Examples
use pmcp::shared::oauth_validation::ApplicationType;
assert_eq!(ApplicationType::Native.as_str(), "native");
assert_eq!(ApplicationType::Web.as_str(), "web");Trait Implementations§
Source§impl Clone for ApplicationType
impl Clone for ApplicationType
impl Copy for ApplicationType
Source§impl Debug for ApplicationType
impl Debug for ApplicationType
impl Eq for ApplicationType
Source§impl Hash for ApplicationType
impl Hash for ApplicationType
Source§impl PartialEq for ApplicationType
impl PartialEq for ApplicationType
impl StructuralPartialEq for ApplicationType
Auto Trait Implementations§
impl Freeze for ApplicationType
impl RefUnwindSafe for ApplicationType
impl Send for ApplicationType
impl Sync for ApplicationType
impl Unpin for ApplicationType
impl UnsafeUnpin for ApplicationType
impl UnwindSafe for ApplicationType
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,
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.