Difference between revisions of "Unit Authentication"
From Ultibo.org
Line 33: | Line 33: | ||
---- | ---- | ||
− | '' | + | |
+ | '''Authenticator classes''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | |||
+ | <code>TAuthenticator = class(TObject)</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | ||
+ | |- | ||
+ | | <code>constructor Create;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>destructor Destroy; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''private'''</div> | ||
+ | |- | ||
+ | | <code>FLock:TCriticalSectionHandle;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>FFlags:LongWord;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>procedure SetFlags(AFlags:LongWord);</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''protected'''</div> | ||
+ | |- | ||
+ | | <code>function AcquireLock:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function ReleaseLock:Boolean;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | ||
+ | |- | ||
+ | | <code>property Flags:LongWord read FFlags write SetFlags;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function UsernamePrompt:String; virtual;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function PasswordPrompt(const AUsername:String):String; virtual;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function CheckUsername(const AUsername:String):LongWord; virtual;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function CheckPassword(const AUsername,APassword:String):LongWord; virtual;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | |||
+ | '''Null authenticator''' | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="border: 1; font-family: arial;"> | ||
+ | |||
+ | <code>TNullAuthenticator = class(TAuthenticator)</code> | ||
+ | <div class="mw-collapsible-content" style="text-align: left; padding-left: 5px;"> | ||
+ | {| class="wikitable" style="font-size: 14px; background: white;" | ||
+ | |- | ||
+ | |colspan="2"|Note: An authenticator module that accepts any username and password. | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | |colspan="2"|<div style="font-family: monospace,courier;">'''public'''</div> | ||
+ | |- | ||
+ | | <code>function UsernamePrompt:String; override;</code> | ||
+ | | style="width: 50%;"| | ||
+ | |- | ||
+ | | <code>function PasswordPrompt(const AUsername:String):String; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | |colspan="2"| | ||
+ | |- | ||
+ | | <code>function CheckUsername(const AUsername:String):LongWord; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | | <code>function CheckPassword(const AUsername,APassword:String):LongWord; override;</code> | ||
+ | | | ||
+ | |- | ||
+ | |} | ||
+ | </div></div> | ||
+ | <br /> | ||
=== Public variables === | === Public variables === |
Revision as of 04:47, 8 March 2017
Return to Unit Reference
Contents
Description
Ultibo Authentication interface unit
To be documented
Constants
Authenticator flag constants
AUTHENTICATOR_FLAG_*
AUTHENTICATOR_FLAG_NONE = $00000000;
|
Type definitions
None defined
Class definitions
Authenticator classes
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