AuthenticationKit.User

A class which is used to describe user login details must implement the AuthenticationKit.User interface. This interface only provides access to details, but does not allow editing of details. An editable user class should implement AuthenticationKit.MutableUser instead.

Interface Methods

Function Algorithm () As Xojo.Crypto.HashAlgorithms

Return the hash algorithm used. Only SHA-1, SHA-256, and SHA-512 algorithms are acceptable values.

Function Iterations () As UInteger

Return the number of PBKDF2 repeats used to generate hashes.

Function LoginKey () As Text

Return the user's login key. It is recommended that the login key not the user's email address or visible to other users at all. An ideal user class will have a login key which is private, and a user name which is public. However, this is by no means a requirement. The returned value should be what the user uses to sign in with.

Function PasswordSalt () As Xojo.Core.MemoryBlock

Return a Xojo.Core.MemoryBlock of the bytes used as the password's salt.

Function SecondFactorSalt () As Xojo.Core.MemoryBlock

Return a Xojo.Core.MemoryBlock of the bytes used as the two factor authentication token's salt.

Function TwoFactorEnabled () As Boolean

Return True if two factor authentication is enabled.

Function UserID () As Auto

Return a unique identifier for the user. This may be a uuid, an integer id, the user's username.... whatever immutable value is used to uniquely identify a user.

Function ValidationHash () As Xojo.Core.MemoryBlock

Return the validation hash provided to the AuthenticationKit.MutableUser.SetSecurityDetails method.

See Also

AuthenticationKit.MutableUser