pub struct SignedSessionAuthPlugin { /* private fields */ }Implementations§
Source§impl SignedSessionAuthPlugin
impl SignedSessionAuthPlugin
Sourcepub fn new(verifier: TokenVerifier) -> Self
pub fn new(verifier: TokenVerifier) -> Self
Create a new signed session auth plugin
Sourcepub fn new_with_async_verifier(verifier: AsyncVerifier) -> Self
pub fn new_with_async_verifier(verifier: AsyncVerifier) -> Self
Create a signed session auth plugin backed by an async verifier, such as JWKS.
Sourcepub fn new_with_multi_key_verifier(verifier: MultiKeyVerifier) -> Self
pub fn new_with_multi_key_verifier(verifier: MultiKeyVerifier) -> Self
Create a signed session auth plugin backed by a multi-key verifier for key rotation.
Sourcepub fn with_query_param_name(self, name: impl Into<String>) -> Self
pub fn with_query_param_name(self, name: impl Into<String>) -> Self
Set a custom query parameter name for the token
Sourcepub fn with_origin_validation(self) -> Self
pub fn with_origin_validation(self) -> Self
Require origin validation (defense-in-depth for browser clients)
Sourcepub fn with_audit_logger(self, logger: Arc<dyn SecurityAuditLogger>) -> Self
pub fn with_audit_logger(self, logger: Arc<dyn SecurityAuditLogger>) -> Self
Set an audit logger for security events
Sourcepub fn with_metrics(self, metrics: Arc<AuthMetrics>) -> Self
pub fn with_metrics(self, metrics: Arc<AuthMetrics>) -> Self
Set metrics collector for auth operations
Sourcepub fn metrics_snapshot(&self) -> Option<AuthMetricsSnapshot>
pub fn metrics_snapshot(&self) -> Option<AuthMetricsSnapshot>
Get metrics snapshot if metrics are enabled
Sourcepub async fn verify_refresh_token(
&self,
token: &str,
) -> Result<AuthContext, AuthDeny>
pub async fn verify_refresh_token( &self, token: &str, ) -> Result<AuthContext, AuthDeny>
Verify a token for in-band refresh and return the auth context
This is used when a client wants to refresh their auth without reconnecting. The origin is NOT validated here - we assume the client has already proven origin at connection time, and we’re just refreshing the session token.
Trait Implementations§
Source§impl WebSocketAuthPlugin for SignedSessionAuthPlugin
impl WebSocketAuthPlugin for SignedSessionAuthPlugin
fn as_any(&self) -> &dyn Any
Source§fn audit_logger(&self) -> Option<&dyn SecurityAuditLogger>
fn audit_logger(&self) -> Option<&dyn SecurityAuditLogger>
Get the audit logger if configured
Source§fn auth_metrics(&self) -> Option<&AuthMetrics>
fn auth_metrics(&self) -> Option<&AuthMetrics>
Get auth metrics if configured
Auto Trait Implementations§
impl Freeze for SignedSessionAuthPlugin
impl !RefUnwindSafe for SignedSessionAuthPlugin
impl Send for SignedSessionAuthPlugin
impl Sync for SignedSessionAuthPlugin
impl Unpin for SignedSessionAuthPlugin
impl UnsafeUnpin for SignedSessionAuthPlugin
impl !UnwindSafe for SignedSessionAuthPlugin
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