McpOAuthOptions class

How this client identifies itself and reaches the user.

Constructors

McpOAuthOptions({required String redirectUri, String clientName = 'MCP client', String? clientIdMetadataUrl, Map<String, OAuthClientRegistration> preRegistered = const {}, OAuthStore? store, Future<Uri> authorize(Uri url)?, String? applicationType, int maxStepUps = 2})

Properties

applicationType → String?
native or web for Dynamic Client Registration; derived from redirectUri when null (a loopback redirect is a native app).
final
authorize → Future<Uri> Function(Uri url)?
Shows the user url and returns the redirect it ends at (desktop, mobile and CLI hosts). Null: the host drives McpOAuth.begin and McpOAuth.complete itself.
final
clientIdMetadataUrl → String?
This client's Client ID Metadata Document: an https URL with a path whose document's client_id is exactly this URL.
final
clientName → String
The name shown at registration.
final
hashCode → int
The hash code for this object.
no setterinherited
maxStepUps → int
How many times one resource may ask for more scope before the failure is treated as permanent.
final
preRegistered → Map<String, OAuthClientRegistration>
Client identities issued in advance, keyed by authorization server issuer. Used only with the issuer that issued them.
final
redirectUri → String
Where the authorization server sends the user back.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
store → OAuthStore
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited