Difference between revisions of "Unit Authentication"

From Ultibo.org
Jump to: navigation, search
Line 39: Line 39:
 
|-
 
|-
 
| [[TAuthenticator|<code>TAuthenticator = class(TObject)</code>]]
 
| [[TAuthenticator|<code>TAuthenticator = class(TObject)</code>]]
| style="width: 40%;"|
 
 
|-
 
|-
 
|}
 
|}
Line 45: Line 44:
 
|-
 
|-
 
| <code>TNullAuthenticator = class(TAuthenticator)</code>
 
| <code>TNullAuthenticator = class(TAuthenticator)</code>
| style="width: 40%;"|
 
 
|-
 
|-
 
|}
 
|}

Revision as of 01:00, 27 April 2018

Return to Unit Reference


Description


Ultibo Authentication interface unit

To be documented

Constants



Authenticator flag AUTHENTICATOR_FLAG_*
AUTHENTICATOR_FLAG_NONE = $00000000;  


Type definitions


None defined

Class definitions



Authentication specific classes

TAuthenticator = class(TObject)
TNullAuthenticator = class(TAuthenticator)

Authenticator

TAuthenticator = class(TObject)

public
constructor Create;  
destructor Destroy; override;  
private
FLock:TCriticalSectionHandle;  
 
FFlags:LongWord;  
 
procedure SetFlags(AFlags:LongWord);  
protected
function AcquireLock:Boolean;  
function ReleaseLock:Boolean;  
public
property Flags:LongWord read FFlags write SetFlags;  
 
function UsernamePrompt:String; virtual;  
function PasswordPrompt(const AUsername:String):String; virtual;  
 
function CheckUsername(const AUsername:String):LongWord; virtual;  
function CheckPassword(const AUsername,APassword:String):LongWord; virtual;  

Null authenticator

TNullAuthenticator = class(TAuthenticator)

Note: An authenticator module that accepts any username and password.
 
public
function UsernamePrompt:String; override;  
function PasswordPrompt(const AUsername:String):String; override;  
 
function CheckUsername(const AUsername:String):LongWord; override;  
function CheckPassword(const AUsername,APassword:String):LongWord; override;  


Public variables


None defined

Function declarations



Initialization functions

procedure AuthInit;
Description: To be documented
Note None documented


Return to Unit Reference