OAuthProviderModePlugin<TContext> class final

Plugin that enables the application to act as an OAuth/OIDC provider.

This plugin allows Routed applications to:

  • Register OAuth clients
  • Issue authorization codes
  • Exchange codes for access tokens
  • Provide userinfo endpoints
  • Support token introspection
  • Serve JWKS for JWT verification
Implemented types

Constructors

OAuthProviderModePlugin({required OAuthClientStore clientStore, required OAuthAuthorizationCodeExchangeStore authorizationCodeExchangeStore, OAuthProviderModeOptions options = const OAuthProviderModeOptions()})
Creates an OAuth/OIDC provider plugin.

Properties

accessTokenStore → OAuthAccessTokenStore
Store for access tokens owned by authorizationCodeExchangeStore.
no setter
authorizationCodeExchangeStore → OAuthAuthorizationCodeExchangeStore
Authoritative exchange capability for authorization-code grants.
final
authorizationCodeStore → OAuthAuthorizationCodeStore
Store for authorization codes owned by authorizationCodeExchangeStore.
no setter
clientOperations → Iterable<AuthClientOperationDescriptor>
Client operations declared by the plugin.
no setteroverride
clientStore → OAuthClientStore
Store for OAuth client registrations.
final
dataContract → AuthServerPluginDataContract
Declares data and destructive routes owned by this plugin.
no setteroverride
endpoints → Iterable<AuthEndpointDescriptor<TContext>>
Runtime endpoints contributed by the plugin.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
id → String
Stable plugin identifier.
no setteroverride
options → OAuthProviderModeOptions
Configuration options.
final
persistenceSchemas → Iterable<AuthPersistenceSchema>
Persistence schemas declared by the plugin.
no setteroverride
rateLimitOperations → Iterable<AuthRateLimitOperation>
Rate-limit operations declared by the plugin.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
userAccessNamespace → String
Namespace of credentials or tokens revoked by this contributor.
no setteroverride
userDataNamespace → String
The namespace used for plugin-owned user data.
no setteroverride

Methods

configure(AuthServerPluginContext<TContext> context) → void
Configures this plugin against the shared runtime context.
override
createUserDeletionPlan(AuthUser user) → Future<AuthUserDeletionPlan>
Creates user deletion plan.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerOAuthTokenGrant(String grantType, AuthOAuthTokenGrantHandler<TContext> handler) → void
Registers an application-owned token grant handler for grantType.
override
revokeUserAccess(String userId) → Future<void>
Revokes this contributor's access records for userId.
override
toString() → String
A string representation of this object.
inherited
validateProductionPosture() → void
Validates that this plugin is safe for production boot.
override

Operators

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