Skip to main content

Crate affinidi_did_authentication

Crate affinidi_did_authentication 

Source
Expand description

DID Authentication Library

DID Authentication steps: Step 1. Get the challenge from a authentication service Step 2. Create a DIDComm message with the challenge in the body Step 3. Sign and Encrypt the DIDComm message, send to the authentication service Step 4. Receive the tokens from the authentication service

NOTE: This library currently supports two different implementations of DID Auth

  1. Affinidi Messaging
  2. MeetingPlace

This needs to be refactored in the future when the services align on implementation

Re-exports§

pub use custom_auth::CustomAuthHandler;
pub use custom_auth::CustomAuthHandlers;
pub use custom_auth::CustomRefreshHandler;

Modules§

custom_auth
errors
DID Authentication Errors

Structs§

AuthRefreshResponse
Refresh tokens response from the authentication service
AuthorizationTokens
The authorization tokens received in the fourth step of the DID authentication process
DIDAuthentication
The DID Authentication struct
MPAuthorizationTokens
The authorization tokens received in the fourth step of the DID authentication process

Enums§

AuthenticationType
RefreshCheck
Possible responses from checking authentication JWT tokens

Functions§

refresh_check
Checks if the tokens need to be refreshed?