event_authenticator_db library
Creates and authenticates user passswords
Classes
- AuthenticationSecretsModel
- Model that holds Authentication related secrets
- AuthenticationSecretsRepository
- Repository to access secrets for the Authenticator
- BaseJWT
- This is the Base JWT Model for your authentication. You can extend this to add more data if necessary, however you can use this as is.
- DatabaseUserAuthenticator
-
Uses a
DatabaseRepositoryand a UserAuthenticationGenerator to automatically create and verify users. - EmailLoginRequest
- Represents an email login
- FileSecretsRepository
- Stores secrets inside of a file. Automatically generates the secrets file if it doesn't exist.
- JWTRole
- This contains the roles that have been allocated for a BaseJWT
- JWTSigner
- Holds information on how to create and sign JWTs
- MethodEncryptDecrypt
- Used to encrypt and decrypt the method used in hashing passwords.
- PasswordHasher
- Hashes passwords using a method (Look at MethodEncryptDecrypt for more information) and a salt and pepper
- UserAuthentication
- Separate object to store the user's authentication credentials
- UserAuthenticationGenerator
- Generates a UserAuthentication and can also confirm if a password matches one generated by it.
- UserModel
- The model that defines and holds important information about your user.
Extensions
- AuthenticationSecretsRepositoryRepositoryGenerator on AuthenticationSecretsRepository
- Adds Authentication Object Generators to AuthenticationSecretsRepository
-
HeaderExtension
on Map<
String, Object> - Adds header methods for passing into requests or responses
Exceptions / Errors
- EventJWTExpiredException
- An exception thrown when a jwt has already expired.
- EventJWTInvalidException
- An exception thrown when a jwt isn't signed correctly or is otherwise invalid.
- NotMethodException
- Exception thrown when a method is expected but not provided in a correct format
- UserModelIDException
- Exception thrown if DatabaseUserAuthenticator interacts with an idless UserModel