UserHashedTableAuth

class UserHashedTableAuth(digester: (String) -> ByteArray, table: Map<String, ByteArray>)

Simple in-memory table that keeps user names and password hashes

Constructors

Link copied to clipboard
fun UserHashedTableAuth(table: Map<String, ByteArray>)
Link copied to clipboard
fun UserHashedTableAuth(config: ApplicationConfig)
Link copied to clipboard
fun UserHashedTableAuth(digester: (String) -> ByteArray, table: Map<String, ByteArray>)

Functions

Link copied to clipboard
fun authenticate(credential: UserPasswordCredential): UserIdPrincipal?

Authenticate user by credential and return an instance of UserIdPrincipal if the credential pair is valid

Properties

Link copied to clipboard
val digester: (String) -> ByteArray

a hash function to compute password digest

Link copied to clipboard
val table: Map<String, ByteArray>

of user names and hashed passwords