pub trait Auth: Send + Sync + 'static {
    // Required methods
    fn register<'life0, 'async_trait>(
        &'life0 self,
        request: Request<RegisterRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<RegisterResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_authentication_challenge<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AuthenticationChallengeRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<AuthenticationChallengeResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn verify_authentication<'life0, 'async_trait>(
        &'life0 self,
        request: Request<AuthenticationAnswerRequest>
    ) -> Pin<Box<dyn Future<Output = Result<Response<AuthenticationAnswerResponse>, Status>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Generated trait containing gRPC methods that should be implemented for use with AuthServer.

Required Methods§

source

fn register<'life0, 'async_trait>( &'life0 self, request: Request<RegisterRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<RegisterResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn create_authentication_challenge<'life0, 'async_trait>( &'life0 self, request: Request<AuthenticationChallengeRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<AuthenticationChallengeResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn verify_authentication<'life0, 'async_trait>( &'life0 self, request: Request<AuthenticationAnswerRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<AuthenticationAnswerResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

source§

impl<C, T, S> Auth for ZkAuth<C, T, S>where T: Send + Sync + 'static + Clone + ByteConvertible<T>, S: Send + Sync + 'static + Clone + ByteConvertible<S>, C: ChaumPedersen<Response = S, CommitmentRandom = S, Challenge = S, Secret = S, GroupParameters = GroupParams<T>, CommitParameters = (T, T, T, T)> + 'static + Sync + Send,

Implementation of the Auth trait for ZkAuth.

This implementation provides the necessary methods for user registration, creating authentication challenges, and verifying authentication answers. It uses generic parameters C, T, and S to work with different cryptographic protocols and data types.

C represents a specific Chaum-Pedersen protocol implementation. T is the type for group parameters and public information. S is the scalar type used for cryptographic operations.