UserHashedTableAuth

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

An in-memory table that keeps usernames and password hashes. This allows you not to compromise user passwords if your data source is leaked.

See also

Constructors

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

Functions

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

Authenticates a user by credential and returns a UserIdPrincipal instance 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 usernames and hashed passwords