-
Notifications
You must be signed in to change notification settings - Fork 0
API Services IAuthenticationService
Christophe SAUVEUR edited this page Sep 29, 2024
·
1 revision
interface IAuthenticationService
Authentication service interface
Since 2.0
public abstract function getCurrentAuthenticatedUser(): ?User
Gets the current user reference, if an authenticated user exists
Since 2.0
User
public abstract function getIdField(): string
Retrieves users management identifier field name
Since 2.0
string
Exception | Reason |
---|---|
MFXException |
If the provided value is not a string or contains invalid characters (only underscores and alphanumeric characters are accepted) |
public abstract function getTableName(): string
Retrieves users management table name
Since 2.0
string
Exception | Reason |
---|---|
MFXException |
If the provided value is not a string or contains invalid characters (only underscores and alphanumeric characters are accepted) |
public abstract function hasAuthenticatedUser(): bool
Tells if an authenticated user currently exists
Since 2.0
bool
public abstract function invalidate()
Invalidates user session. Logs out the current authenticated user if existing
Since 2.0
public abstract function isEnabled(): bool
Tells if user management is enabled
Since 2.0
bool
public abstract function validateWithFields(array $fields): bool
Validates a user session using database fields
Since 2.0
Name | Type | Description |
---|---|---|
$fields |
array |
Key-value pairs for database validation |
boolean
true if the session has been validated, false either
Getting Started | Framework Reference | API Reference | MFX is released under the MIT license