pub trait OAuthClientSecretHasher:
Send
+ Sync
+ Debug {
// Required method
fn hash<'life0, 'life1, 'async_trait>(
&'life0 self,
secret: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn verify<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
secret: &'life1 str,
stored: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
}Expand description
Custom client-secret hash storage, matching storeClientSecret.hash and optional verify.
Required Methods§
fn hash<'life0, 'life1, 'async_trait>(
&'life0 self,
secret: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Provided Methods§
Sourcefn verify<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
secret: &'life1 str,
stored: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn verify<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
secret: &'life1 str,
stored: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Override verification for application-owned formats or password hashing. The default hashes the presented secret and compares it in constant time.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".