This class is bundled with all the necessary functions needed for authentication.
Authentication is handled by the Simcify\Auth class. The core methods are described below:
$remember = false
Authenticates a user after email/username - password verification is done and sets a remember cookie on request.
If set to true, a remember cookie is set for the user.
Gets the authentication state of the current user.
true if authenticated
false if not
Revokes the current user's authentication and deletes any remember cookies.
Creates a sha256 hashed value of the string passed using PHP's
hmac_hash function salted with the application's secret key.
The string to hash
string - A hashed value of the input string.
Authenticates a user using their remember cookie without the need to prompt them for a username and password. NOTE: The user must have enabled cookies on their browser for this to work correctly. Remember to follow GDPR guidelines on cookies.
Retrieves the authenticated user from the database with all fields included. NOTE: The
->password field is already hashed.
\stdclass - A standard PHP object with the user's database fields as properties.