AuthenticationKit.MutableUser

This interface aggregates AuthenticationKit.User, meaning all methods required by AuthenticationKit.User will also be required by AuthenticationKit.MutableUser.

This interfaces should be implemented by a user class that can be modified. It is perfectly acceptable to use a single editable user class, as opposed to a mutable and immutable pair of classes.

Interface Methods

Sub LoginKey (Assigns Value As Text)

Allows the login key to be changed for the user. If a user class does not allow editable login keys (not recommended) then simply leave this method empty.

Sub SetSecurityDetails (Iterations As UInteger, Algorithm As Xojo.Crypto.HashAlgorithms, ValidationHash As Xojo.Core.MemoryBlock, PasswordSalt As Xojo.Core.MemoryBlock, SecondFactorSalt As Xojo.Core.MemoryBlock)

When changing the password for a user, new security details will be generated by the framework and passed to the user class via this method.

SecondFactorSalt will be nil if two factor authentication is to be disabled. All other parameters are required and will be set.

Extension Methods

These methods are supplied by the AuthenticationKit module automatically to all implementors of the interface.

Function SetPassword (Extends User As AuthenticationKit.MutableUser, Password As Text, Iterations As UInteger, Algorithm As Xojo.Crypto.HashAlgorithms) As AuthenticationKit.Token()

Change the user's password with two factor authentication disabled.

Function SetPassword (Extends User As AuthenticationKit.MutableUser, Password As Text, Iterations As UInteger, Algorithm As Xojo.Crypto.HashAlgorithms, ByRef Generator As AuthenticationKit.TwoFactorProfile) As AuthenticationKit.Token()

Change the user's password with two factor authentication enabled.

See Also

AuthenticationKit.User