Skip to content

Kitto.Auth.DBServer ​

Defines the DBServer authenticator and related classes and services.

This authenticator uses the database server to authenticate users.

TKDBServerAuthenticator class ​

The DBServer authenticator uses the database server to authenticate users.

It needs the same items as its ancestor <see cref= "TKClassicAuthenticator" />.

In order for this authenticator to work, it is required that the user-name and password placeholders in the database connection strings stored in Config.yaml are written as %Auth:UserName% and %Auth:Password%. When Authenticate is called, the authenticator will allow macro substitution of these items and try to connect to the database.

pascal
function SupportsPasswordChange: Boolean;

The credentials here are the DATABASE SERVER's own: authentication is a connection attempt, and the accounts live in the DBMS. Changing or resetting one would mean altering a database user, which is a job for the DBA, not for this authenticator. The three members below are implemented rather than left abstract because abstract members of a factory-created class do not fail at build time: they raise "Abstract Error" the first time a user reaches the feature.

pascal
procedure ResetPassword(const AParams: TEFNode);

Raises: resetting one of these accounts means altering a database server user, which is a DBA operation, not an application one.

pascal
procedure QRGenerate(const AParams: TEFNode);

Raises: the DBMS owns the credential, so there is no per-user secret here to enrol a device with.

pascal
function IsPasswordMatching(const ASuppliedPasswordHash: string;

Always False: authentication here is a connection attempt, so no hash comparison takes place and no stored hash exists to compare.

Released under Apache License, Version 2.0.