Difference between revisions of "Unit Authentication"
From Ultibo.org
| (13 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
---- | ---- | ||
| − | '''Ultibo Authentication | + | '''Ultibo Authentication Interface unit''' |
| − | + | ||
| − | + | ||
=== Constants === | === Constants === | ||
| Line 20: | Line 18: | ||
| <code>AUTHENTICATOR_FLAG_NONE = $00000000;</code> | | <code>AUTHENTICATOR_FLAG_NONE = $00000000;</code> | ||
| style="width: 50%;"| | | style="width: 50%;"| | ||
| + | |- | ||
| + | | <code>AUTHENTICATOR_FLAG_USERNAME = $00000001; {Authenticator supports usernames</code> | ||
| + | | style="width: 50%;"| | ||
| + | |- | ||
| + | | <code>AUTHENTICATOR_FLAG_PASSWORD = $00000002; {Authenticator supports passwords</code> | ||
| + | | style="width: 50%;"| | ||
| + | |- | ||
| + | | <code>AUTHENTICATOR_FLAG_TOKEN = $00000004;</code> | ||
| + | | style="width: 50%;"| | ||
| + | |- | ||
| + | | <code>AUTHENTICATOR_FLAG_KEY = $00000008;</code> | ||
| + | | Authenticator supports tokens | ||
| + | |- | ||
| + | | <code>AUTHENTICATOR_FLAG_CACHE = $00000010;</code> | ||
| + | | Authenticator supports token and value caching (eg session caching) | ||
| + | |- | ||
| + | | <code>AUTHENTICATOR_FLAG_LOCAL = $00000020;</code> | ||
| + | | Authenticator maintains a local list of usernames, passwords or tokens | ||
| + | |- | ||
| + | |} | ||
| + | </div></div> | ||
| + | <br /> | ||
| + | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial; padding-top: 20px; padding-bottom: 15px;"> | ||
| + | <div style="font-size: 14px; padding-left: 12px;">'''Authenticator mode''' <code> AUTHENTICATOR_MODE_* </code></div> | ||
| + | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
| + | {| class="wikitable" style="font-size: 14px; background: white;" | ||
| + | |- | ||
| + | | <code>AUTHENTICATOR_MODE_UNKNOWN = 0;</code> | ||
| + | | style="width: 50%;"| | ||
| + | |- | ||
| + | | <code>AUTHENTICATOR_MODE_BASIC = 1;</code> | ||
| + | | Password only authentication | ||
| + | |- | ||
| + | | <code>AUTHENTICATOR_MODE_USER = 2;</code> | ||
| + | | Username and password authentication | ||
| + | |- | ||
| + | | <code>AUTHENTICATOR_MODE_SESSION = 3;</code> | ||
| + | | Session authentication | ||
|- | |- | ||
|} | |} | ||
| Line 28: | Line 64: | ||
---- | ---- | ||
| − | |||
| − | + | '''Authentication check password event''' | |
| − | + | ||
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
| + | |- | ||
| + | | <code>TCheckPasswordEvent = function(ASource:TAuthenticator; const APassword:String):LongWord of Object;</code> | ||
| + | | style="width: 40%;"| | ||
| + | |- | ||
| + | |} | ||
| − | '''Authentication | + | '''Authentication check username event''' |
{| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
|- | |- | ||
| − | | <code> | + | | <code>TCheckUsernameEvent = function(ASource:TAuthenticator; const AUsername:String):LongWord of Object;</code> |
| style="width: 40%;"| | | style="width: 40%;"| | ||
|- | |- | ||
|} | |} | ||
| − | ''' | + | '''Authentication check user password event''' |
| − | + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
|- | |- | ||
| − | + | | <code>TCheckUserPasswordEvent = function(ASource:TAuthenticator; const AUsername,APassword:String):LongWord of Object;</code> | |
| + | | style="width: 40%;"| | ||
|- | |- | ||
| − | | | + | |} |
| − | | style="width: | + | |
| + | '''Authentication check token event''' | ||
| + | |||
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
|- | |- | ||
| − | | <code> | + | | <code>FCheckTokenEvent = function(ASource:TAuthenticator; const AToken,AValue:String):LongWord of Object;</code> |
| − | | | + | | style="width: 40%;"| |
|- | |- | ||
| − | | | + | |} |
| + | |||
| + | '''Authentication create token event''' | ||
| + | |||
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
|- | |- | ||
| − | | <code> | + | | <code>TCreateTokenEvent = function(ASource:TAuthenticator; const AValue:String; var AToken:String; ATimeout:LongWord):LongWord of Object;</code> |
| − | | | + | | style="width: 40%;"| |
|- | |- | ||
| − | | | + | |} |
| + | |||
| + | '''Authentication delete token event''' | ||
| + | |||
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
|- | |- | ||
| − | | <code> | + | | <code>TDeleteTokenEvent = function(ASource:TAuthenticator; const AToken,AValue:String):LongWord of Object;</code> |
| − | | | + | | style="width: 40%;"| |
|- | |- | ||
| − | | | + | |} |
| + | |||
| + | '''Authentication check key event''' | ||
| + | |||
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
|- | |- | ||
| − | | <code> | + | | <code>TCheckKeyEvent = function(ASource:TAuthenticator; AData:Pointer; ASize:LongWord):LongWord of Object;</code> |
| − | + | | style="width: 40%;"| | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | | | + | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
|- | |- | ||
|} | |} | ||
| − | </ | + | <br /> |
| − | + | === Class definitions === | |
| + | ---- | ||
| − | |||
| − | + | '''Authentication specific classes''' | |
| − | + | ||
| − | {| class="wikitable" style="font-size: 14px; | + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" |
|- | |- | ||
| − | | | + | | [[TAuthenticator|<code>TAuthenticator = class(TObject)</code>]] |
|- | |- | ||
| − | | | + | |} |
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
| + | |- | ||
| + | | [[TNullAuthenticator|<code>TNullAuthenticator = class(TAuthenticator)</code>]] | ||
|- | |- | ||
| − | | | + | |} |
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
| + | |- | ||
| + | | [[TBasicAuthenticator|<code>TBasicAuthenticator = class(TAuthenticator)</code>]] | ||
|- | |- | ||
| − | | | + | |} |
| − | | style="width: | + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" |
| + | |- | ||
| + | | [[TLocalBasicAuthenticator|<code>TLocalBasicAuthenticator = class(TAuthenticator)</code>]] | ||
|- | |- | ||
| − | | <code> | + | |} |
| − | + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | |
| + | |- | ||
| + | | [[TUserAuthenticator|<code>TUserAuthenticator = class(TAuthenticator)</code>]] | ||
|- | |- | ||
| − | | | + | |} |
| + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | ||
| + | |- | ||
| + | | [[TLocalUserAuthenticator|<code>TLocalUserAuthenticator = class(TAuthenticator)</code>]] | ||
|- | |- | ||
| − | | <code> | + | |} |
| − | + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | |
| + | |- | ||
| + | | [[TSessionAuthenticator|<code>TSessionAuthenticator = class(TAuthenticator)</code>]] | ||
|- | |- | ||
| − | | <code> | + | |} |
| − | + | {| class="wikitable" style="font-size: 14px; text-align: left; width: 100%; height: 50px;" | |
| + | |- | ||
| + | | [[TLocalSessionAuthenticator|<code>TLocalSessionAuthenticator = class(TAuthenticator)</code>]] | ||
|- | |- | ||
|} | |} | ||
| − | |||
<br /> | <br /> | ||
Latest revision as of 05:34, 23 October 2025
Return to Unit Reference
Contents
Description
Ultibo Authentication Interface unit
Constants
Authenticator flag
AUTHENTICATOR_FLAG_* AUTHENTICATOR_FLAG_NONE = $00000000;
|
|
AUTHENTICATOR_FLAG_USERNAME = $00000001; {Authenticator supports usernames
|
|
AUTHENTICATOR_FLAG_PASSWORD = $00000002; {Authenticator supports passwords
|
|
AUTHENTICATOR_FLAG_TOKEN = $00000004;
|
|
AUTHENTICATOR_FLAG_KEY = $00000008;
|
Authenticator supports tokens |
AUTHENTICATOR_FLAG_CACHE = $00000010;
|
Authenticator supports token and value caching (eg session caching) |
AUTHENTICATOR_FLAG_LOCAL = $00000020;
|
Authenticator maintains a local list of usernames, passwords or tokens |
Authenticator mode
AUTHENTICATOR_MODE_* AUTHENTICATOR_MODE_UNKNOWN = 0;
|
|
AUTHENTICATOR_MODE_BASIC = 1;
|
Password only authentication |
AUTHENTICATOR_MODE_USER = 2;
|
Username and password authentication |
AUTHENTICATOR_MODE_SESSION = 3;
|
Session authentication |
Type definitions
Authentication check password event
TCheckPasswordEvent = function(ASource:TAuthenticator; const APassword:String):LongWord of Object;
|
Authentication check username event
TCheckUsernameEvent = function(ASource:TAuthenticator; const AUsername:String):LongWord of Object;
|
Authentication check user password event
TCheckUserPasswordEvent = function(ASource:TAuthenticator; const AUsername,APassword:String):LongWord of Object;
|
Authentication check token event
FCheckTokenEvent = function(ASource:TAuthenticator; const AToken,AValue:String):LongWord of Object;
|
Authentication create token event
TCreateTokenEvent = function(ASource:TAuthenticator; const AValue:String; var AToken:String; ATimeout:LongWord):LongWord of Object;
|
Authentication delete token event
TDeleteTokenEvent = function(ASource:TAuthenticator; const AToken,AValue:String):LongWord of Object;
|
Authentication check key event
TCheckKeyEvent = function(ASource:TAuthenticator; AData:Pointer; ASize:LongWord):LongWord of Object;
|
Class definitions
Authentication specific classes
TAuthenticator = class(TObject)
|
TNullAuthenticator = class(TAuthenticator)
|
TBasicAuthenticator = class(TAuthenticator)
|
TLocalBasicAuthenticator = class(TAuthenticator)
|
TUserAuthenticator = class(TAuthenticator)
|
TLocalUserAuthenticator = class(TAuthenticator)
|
TSessionAuthenticator = class(TAuthenticator)
|
TLocalSessionAuthenticator = class(TAuthenticator)
|
Public variables
None defined
Function declarations
Initialization functions
procedure AuthInit;
Description: To be documented
| Note | None documented |
|---|
Return to Unit Reference