pub struct OAuthProviderPlugin { /* private fields */ }Implementations§
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub async fn validate_access_token<S: AuthSchema>(
&self,
ctx: &AuthContext<S>,
token: &str,
client_id: Option<&str>,
) -> Result<Value, EndpointError>
pub async fn validate_access_token<S: AuthSchema>( &self, ctx: &AuthContext<S>, token: &str, client_id: Option<&str>, ) -> Result<Value, EndpointError>
Validate access authority and return its RFC 7662 payload.
Unknown tokens are errors; recognized but inactive authority returns active: false.
Sourcepub async fn require_active_access_token<S: AuthSchema>(
&self,
ctx: &AuthContext<S>,
token: &str,
client_id: Option<&str>,
) -> Result<Value, EndpointError>
pub async fn require_active_access_token<S: AuthSchema>( &self, ctx: &AuthContext<S>, token: &str, client_id: Option<&str>, ) -> Result<Value, EndpointError>
Require recognized and active authority, preserving the reference Bearer challenge.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub async fn authenticate_client<S: AuthSchema>(
&self,
ctx: &AuthContext<S>,
call: &EndpointCall,
grant_type: Option<&str>,
options: &OAuthClientAuthenticationOptions,
) -> Result<OAuthAuthenticatedClient, EndpointError>
pub async fn authenticate_client<S: AuthSchema>( &self, ctx: &AuthContext<S>, call: &EndpointCall, grant_type: Option<&str>, options: &OAuthClientAuthenticationOptions, ) -> Result<OAuthAuthenticatedClient, EndpointError>
Authenticate a client against this endpoint, its scopes and an optional bound grant.
Equivalent to getOAuthProviderApi(...).authenticateClient; assertion audiences
use the logical endpoint path. Public clients require an explicit caller opt-in.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Authorize an OAuth request with its genuine physical request attached.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
pub fn create_oauth_client_endpoint( input: &CreateOAuthClientInput, ) -> AuthResult<ServerEndpoint<Value>>
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn get_oauth_client_endpoint(
client_id: &str,
) -> AuthResult<ServerEndpoint<Value>>
pub fn get_oauth_client_endpoint( client_id: &str, ) -> AuthResult<ServerEndpoint<Value>>
Read an owned client without exposing its stored credential.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn get_oauth_client_public_endpoint(
client_id: &str,
) -> AuthResult<ServerEndpoint<Value>>
pub fn get_oauth_client_public_endpoint( client_id: &str, ) -> AuthResult<ServerEndpoint<Value>>
Read public display fields for any authenticated user.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn get_oauth_clients_endpoint() -> ServerEndpoint<Value>
pub fn get_oauth_clients_endpoint() -> ServerEndpoint<Value>
List durable clients belonging to the authenticated user.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn delete_oauth_client_endpoint(
client_id: &str,
) -> AuthResult<ServerEndpoint<()>>
pub fn delete_oauth_client_endpoint( client_id: &str, ) -> AuthResult<ServerEndpoint<()>>
Delete a durable client owned by the authenticated user.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn rotate_client_secret_endpoint(
client_id: &str,
) -> AuthResult<ServerEndpoint<Value>>
pub fn rotate_client_secret_endpoint( client_id: &str, ) -> AuthResult<ServerEndpoint<Value>>
Rotate an owned confidential client secret and reveal its replacement once.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn update_oauth_client_endpoint(
client_id: &str,
update: &impl Serialize,
) -> AuthResult<ServerEndpoint<Value>>
pub fn update_oauth_client_endpoint( client_id: &str, update: &impl Serialize, ) -> AuthResult<ServerEndpoint<Value>>
Patch metadata of a durable client owned by the authenticated user.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn register_oauth_client_endpoint(
input: &impl Serialize,
) -> AuthResult<ServerEndpoint<Value>>
pub fn register_oauth_client_endpoint( input: &impl Serialize, ) -> AuthResult<ServerEndpoint<Value>>
Register a client under the provider’s dynamic-registration policy.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn admin_create_oauth_client_endpoint(
input: &impl Serialize,
) -> AuthResult<ServerEndpoint<Value>>
pub fn admin_create_oauth_client_endpoint( input: &impl Serialize, ) -> AuthResult<ServerEndpoint<Value>>
Create a managed client with operator fields through the trusted server API.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn admin_update_oauth_client_endpoint(
client_id: &str,
update: &impl Serialize,
) -> AuthResult<ServerEndpoint<Value>>
pub fn admin_update_oauth_client_endpoint( client_id: &str, update: &impl Serialize, ) -> AuthResult<ServerEndpoint<Value>>
Patch operator-controlled fields of an owned client through the server-only API.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn get_oauth_client_public_prelogin_endpoint(
client_id: &str,
oauth_query: Option<&str>,
) -> AuthResult<ServerEndpoint<Value>>
pub fn get_oauth_client_public_prelogin_endpoint( client_id: &str, oauth_query: Option<&str>, ) -> AuthResult<ServerEndpoint<Value>>
Read public client display metadata before login using a provider-issued authorization query.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub async fn register_client_metadata_document<S: AuthSchema>(
&self,
input: RegisterClientMetadataDocumentInput,
ctx: &AuthContext<S>,
) -> Result<OAuthClientRegistrationResult, EndpointError>
pub async fn register_client_metadata_document<S: AuthSchema>( &self, input: RegisterClientMetadataDocumentInput, ctx: &AuthContext<S>, ) -> Result<OAuthClientRegistrationResult, EndpointError>
Persist a validated document under its discovery owner. This does not fetch or discover it.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn oauth2_consent_endpoint(
accept: bool,
scope: Option<&str>,
oauth_query: Option<&str>,
) -> AuthResult<ServerEndpoint<Value>>
pub fn oauth2_consent_endpoint( accept: bool, scope: Option<&str>, oauth_query: Option<&str>, ) -> AuthResult<ServerEndpoint<Value>>
Accept or deny a provider-issued authorization request as the current user.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn get_oauth_consents_endpoint() -> ServerEndpoint<Value>
pub fn get_oauth_consents_endpoint() -> ServerEndpoint<Value>
List durable OAuth grants belonging to the current authenticated user.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn get_oauth_consent_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
pub fn get_oauth_consent_endpoint(id: &str) -> AuthResult<ServerEndpoint<Value>>
Return the current user’s durable consent identified by its stored grant ID.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn update_oauth_consent_endpoint(
id: &str,
scopes: &[String],
) -> AuthResult<ServerEndpoint<Value>>
pub fn update_oauth_consent_endpoint( id: &str, scopes: &[String], ) -> AuthResult<ServerEndpoint<Value>>
Replace the current user’s granted scopes with a subset allowed by the client.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn delete_oauth_consent_endpoint(id: &str) -> AuthResult<ServerEndpoint<()>>
pub fn delete_oauth_consent_endpoint(id: &str) -> AuthResult<ServerEndpoint<()>>
Delete the current user’s stored OAuth grant.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn oauth2_continue_endpoint(
input: &impl Serialize,
) -> AuthResult<ServerEndpoint<Value>>
pub fn oauth2_continue_endpoint( input: &impl Serialize, ) -> AuthResult<ServerEndpoint<Value>>
Resume a signed OAuth request after account selection, registration or post-login interaction.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub async fn get_client<S: AuthSchema>(
&self,
ctx: &AuthContext<S>,
client_id: &str,
) -> AuthResult<Option<OAuthClient>>
pub async fn get_client<S: AuthSchema>( &self, ctx: &AuthContext<S>, client_id: &str, ) -> AuthResult<Option<OAuthClient>>
Resolve the raw client for a trusted server caller, including stored credentials.
Equivalent to getOAuthProviderApi(...).getClient; callers authorize access.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn get_oauth_provider_api<'a, S: AuthSchema>(
&'a self,
context: &'a AuthContext<S>,
call: &'a EndpointCall,
grant_type: Option<&'a str>,
) -> impl OAuthProviderApi + 'a
pub fn get_oauth_provider_api<'a, S: AuthSchema>( &'a self, context: &'a AuthContext<S>, call: &'a EndpointCall, grant_type: Option<&'a str>, ) -> impl OAuthProviderApi + 'a
Obtain live capabilities for an extension or a trusted companion endpoint. Issuance without a bound grant is rejected by the shared issuance owner.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub async fn issue_tokens<S: AuthSchema>(
&self,
ctx: &AuthContext<S>,
call: &EndpointCall,
grant_type: Option<&str>,
params: &OAuthTokenIssueParams,
) -> Result<Value, EndpointError>
pub async fn issue_tokens<S: AuthSchema>( &self, ctx: &AuthContext<S>, call: &EndpointCall, grant_type: Option<&str>, params: &OAuthTokenIssueParams, ) -> Result<Value, EndpointError>
Mint authority for an already authorized caller. The grant is required, but need not be registered: admission is the trusted caller’s responsibility.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn oauth2_introspect_endpoint(
input: &impl Serialize,
) -> AuthResult<ServerEndpoint<Value>>
pub fn oauth2_introspect_endpoint( input: &impl Serialize, ) -> AuthResult<ServerEndpoint<Value>>
Inspect an access or refresh token using the introspecting client’s credentials.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
pub fn oauth2_end_session_confirmation_endpoint() -> AuthResult<ServerEndpoint<Value>>
pub fn oauth2_end_session_endpoint( input: &Value, ) -> AuthResult<ServerEndpoint<Value>>
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn admin_create_oauth_resource_endpoint(
input: &impl Serialize,
) -> AuthResult<ServerEndpoint<Value>>
pub fn admin_create_oauth_resource_endpoint( input: &impl Serialize, ) -> AuthResult<ServerEndpoint<Value>>
Create durable provider resource policy through the server-only administration API.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn admin_list_oauth_resources_endpoint() -> ServerEndpoint<Value>
pub fn admin_list_oauth_resources_endpoint() -> ServerEndpoint<Value>
List the provider’s complete resource catalog through its server-only API.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn admin_get_oauth_resource_endpoint(
identifier: &str,
) -> AuthResult<ServerEndpoint<Value>>
pub fn admin_get_oauth_resource_endpoint( identifier: &str, ) -> AuthResult<ServerEndpoint<Value>>
Read durable resource policy by a raw or URI-encoded identifier through the server-only API.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn admin_update_oauth_resource_endpoint(
identifier: &str,
patch: &impl Serialize,
) -> AuthResult<ServerEndpoint<Value>>
pub fn admin_update_oauth_resource_endpoint( identifier: &str, patch: &impl Serialize, ) -> AuthResult<ServerEndpoint<Value>>
Patch the provider’s durable resource policy without changing its identifier.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn admin_delete_oauth_resource_endpoint(
identifier: &str,
) -> AuthResult<ServerEndpoint<Value>>
pub fn admin_delete_oauth_resource_endpoint( identifier: &str, ) -> AuthResult<ServerEndpoint<Value>>
Remove durable provider resource policy through the server-only administration API.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn admin_link_client_resource_endpoint(
identifier: &str,
client_id: &str,
) -> AuthResult<ServerEndpoint<Value>>
pub fn admin_link_client_resource_endpoint( identifier: &str, client_id: &str, ) -> AuthResult<ServerEndpoint<Value>>
Grant a client durable membership in a provider resource through the server-only API.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn admin_unlink_client_resource_endpoint(
identifier: &str,
client_id: &str,
) -> AuthResult<ServerEndpoint<Value>>
pub fn admin_unlink_client_resource_endpoint( identifier: &str, client_id: &str, ) -> AuthResult<ServerEndpoint<Value>>
Remove a client’s durable resource membership, including an already absent pair.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn oauth2_revoke_endpoint(
input: &impl Serialize,
) -> AuthResult<ServerEndpoint<Value>>
pub fn oauth2_revoke_endpoint( input: &impl Serialize, ) -> AuthResult<ServerEndpoint<Value>>
Revoke an issued token using its client’s registered authentication method.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn oauth2_token_endpoint(
input: &impl Serialize,
) -> AuthResult<ServerEndpoint<Value>>
pub fn oauth2_token_endpoint( input: &impl Serialize, ) -> AuthResult<ServerEndpoint<Value>>
Exchange an OAuth grant through the provider’s public server operation.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub async fn hash_token(&self, token: &str, kind: &str) -> AuthResult<String>
pub async fn hash_token(&self, token: &str, kind: &str) -> AuthResult<String>
Hash a token using this provider’s storage policy (getOAuthProviderApi().hashToken).
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
Sourcepub fn oauth2_user_info_endpoint() -> ServerEndpoint<Value>
pub fn oauth2_user_info_endpoint() -> ServerEndpoint<Value>
Read the current user claims authorized by an OAuth access token.
Source§impl OAuthProviderPlugin
impl OAuthProviderPlugin
pub fn new() -> Self
pub fn with_config(config: OAuthProviderConfig) -> Self
Sourcepub fn get_oauth_server_config_endpoint() -> ServerEndpoint<Value>
pub fn get_oauth_server_config_endpoint() -> ServerEndpoint<Value>
Return the issuer’s authorization-server configuration for trusted server callers.
Sourcepub fn get_open_id_config_endpoint() -> ServerEndpoint<Value>
pub fn get_open_id_config_endpoint() -> ServerEndpoint<Value>
Return OpenID configuration when the provider supports the openid scope.
Trait Implementations§
Source§impl<S: AuthSchema> AuthPlugin<S> for OAuthProviderPlugin
impl<S: AuthSchema> AuthPlugin<S> for OAuthProviderPlugin
Source§fn rate_limits(&self) -> Vec<PluginRateLimit>
fn rate_limits(&self) -> Vec<PluginRateLimit>
Source§fn endpoint_hooks(&self) -> Vec<&dyn EndpointHook<S>>
fn endpoint_hooks(&self) -> Vec<&dyn EndpointHook<S>>
Source§fn before_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<BeforeRequestAction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn before_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<BeforeRequestAction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn after_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
response: AuthResponse,
) -> Pin<Box<dyn Future<Output = AuthResult<AuthResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn after_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
response: AuthResponse,
) -> Pin<Box<dyn Future<Output = AuthResult<AuthResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn allowed_media_types(&self, route: &AuthRoute) -> Vec<&'static str>
fn allowed_media_types(&self, route: &AuthRoute) -> Vec<&'static str>
Source§fn server_endpoints(&self) -> Vec<EndpointDefinition>
fn server_endpoints(&self) -> Vec<EndpointDefinition>
Source§fn validate_endpoint(
&self,
call: &EndpointCall,
_ctx: &AuthContext<S>,
) -> AuthResult<EndpointInput>
fn validate_endpoint( &self, call: &EndpointCall, _ctx: &AuthContext<S>, ) -> AuthResult<EndpointInput>
Source§fn on_endpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
call: &'life1 EndpointCall,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<EndpointResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_endpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
call: &'life1 EndpointCall,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<EndpointResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn on_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<AuthResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn on_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<AuthResponse>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn on_init<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut AuthInitContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn on_init<'life0, 'life1, 'async_trait>(
&'life0 self,
ctx: &'life1 mut AuthInitContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn origin_check_skip_paths(&self) -> Vec<&'static str>
fn origin_check_skip_paths(&self) -> Vec<&'static str>
Source§fn session_fields(&self) -> IndexMap<String, FieldConfig>
fn session_fields(&self) -> IndexMap<String, FieldConfig>
fn user_fields(&self) -> IndexMap<String, FieldConfig>
fn account_fields(&self) -> IndexMap<String, FieldConfig>
Source§fn openapi_metadata(&self, _ctx: &AuthInitContext<S>) -> PluginOpenApiMetadata
fn openapi_metadata(&self, _ctx: &AuthInitContext<S>) -> PluginOpenApiMetadata
Source§fn static_openapi_metadata(&self) -> PluginOpenApiMetadata
fn static_openapi_metadata(&self) -> PluginOpenApiMetadata
Source§fn on_http_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_http_request<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Source§fn on_http_request_action<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<HttpRequestAction>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_http_request_action<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<HttpRequestAction>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
on_http_request implementations. Request-local configuration has already
been resolved from the incoming request, matching the Source HTTP handler.Source§fn on_http_response<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
_response: &'life3 AuthResponse,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn on_http_response<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_req: &'life1 AuthRequest,
_ctx: &'life2 AuthContext<S>,
_response: &'life3 AuthResponse,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Source§fn on_http_endpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<HttpEndpointResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_http_endpoint<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
req: &'life1 AuthRequest,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<Option<HttpEndpointResponse>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
on_request; plugins returning a native raw response can
override this method to bypass the endpoint after-hook pipeline.Source§fn on_user_created<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user: &'life1 <S as AuthSchema>::User,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_user_created<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user: &'life1 <S as AuthSchema>::User,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Source§fn on_session_created<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session: &'life1 <S as AuthSchema>::Session,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_session_created<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session: &'life1 <S as AuthSchema>::Session,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Source§fn on_user_deleted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_user_deleted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_user_id: &'life1 str,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Source§fn on_session_deleted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session_token: &'life1 str,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn on_session_deleted<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session_token: &'life1 str,
_ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Source§impl Clone for OAuthProviderPlugin
impl Clone for OAuthProviderPlugin
Source§impl Debug for OAuthProviderPlugin
impl Debug for OAuthProviderPlugin
Source§impl Default for OAuthProviderPlugin
impl Default for OAuthProviderPlugin
Source§impl<S: AuthSchema> EndpointHook<S> for OAuthProviderPlugin
impl<S: AuthSchema> EndpointHook<S> for OAuthProviderPlugin
Source§fn matches_before(
&self,
call: &EndpointCall,
_: &AuthContext<S>,
) -> AuthResult<bool>
fn matches_before( &self, call: &EndpointCall, _: &AuthContext<S>, ) -> AuthResult<bool>
Source§fn before<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
call: &'life1 EndpointCall,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<BeforeEndpointAction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn before<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
call: &'life1 EndpointCall,
ctx: &'life2 AuthContext<S>,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<BeforeEndpointAction>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn after<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
call: &'life1 EndpointCall,
ctx: &'life2 AuthContext<S>,
response: EndpointResponse,
) -> Pin<Box<dyn Future<Output = AuthResult<EndpointResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn after<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
call: &'life1 EndpointCall,
ctx: &'life2 AuthContext<S>,
response: EndpointResponse,
) -> Pin<Box<dyn Future<Output = AuthResult<EndpointResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn matches_after(
&self,
_call: &EndpointCall,
_ctx: &AuthContext<S>,
_response: &EndpointResponse,
) -> Result<bool, AuthError>
fn matches_after( &self, _call: &EndpointCall, _ctx: &AuthContext<S>, _response: &EndpointResponse, ) -> Result<bool, AuthError>
Auto Trait Implementations§
impl !RefUnwindSafe for OAuthProviderPlugin
impl !UnwindSafe for OAuthProviderPlugin
impl Freeze for OAuthProviderPlugin
impl Send for OAuthProviderPlugin
impl Sync for OAuthProviderPlugin
impl Unpin for OAuthProviderPlugin
impl UnsafeUnpin for OAuthProviderPlugin
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more