Amanu
Projektmanagement für Selbstständige und Freelancer
Authenticator Class Reference

Static Public Member Functions

static login ($email, $fe_salted_password)
 
static logout ()
 
static getUser ()
 
static isLoggedin ()
 
static onlyFor ()
 
static getToken ($usertime, $previous=false)
 

Detailed Description

This class handles authentication and token management

This file is part of the project codename "AMANUENSIS"

Author
Sebastian Antosch s.ant.nosp@m.osch.nosp@m.@i-sa.nosp@m.n.de

Member Function Documentation

static login (   $email,
  $fe_salted_password 
)
static

Logs an user in

Parameters
string$email- the users email address
string$fe_salted_password- the password string which is already salted from the frontend
Returns
boolean - true if success, false if fail
static logout ( )
static

Logs the user out

Returns
boolean - true if success, false if fail
static getUser ( )
static

Gets the current User object

Returns
User|NULL
static isLoggedin ( )
static

Checks if a user is logged in

Returns
boolean
static onlyFor ( )
static

Checks if the user is logged in and has one of the as parameter given access levels, outputs matching errors if not

static getToken (   $usertime,
  $previous = false 
)
static

Returns an validation Token

Parameters
$usertime- the creation timestamp of the user
$previous- whether or not the previous token should be get
Returns
string - an validation token

The documentation for this class was generated from the following file: