The example implementation makes sure if the username and password
are both 'demo'.
In practical applications, this should be changed to authenticate
against some persistent user identity storage (e.g. database).
public authenticate ( ) : boolean | ||
Результат | boolean | whether authentication succeeds. |