13 if (!array_key_exists(
'AuthState', $_REQUEST)) {
25 if (array_key_exists(
'username', $_REQUEST)) {
26 $username = $_REQUEST[
'username'];
27 } elseif (
$source->getRememberUsernameEnabled() && array_key_exists(
$source->getAuthId() .
'-username',
$_COOKIE)) {
29 } elseif (isset(
$state[
'core:username'])) {
35 if (array_key_exists(
'password', $_REQUEST)) {
44 if (!empty($_REQUEST[
'username']) || !empty(
$password)) {
47 if (array_key_exists(
'forcedUsername',
$state)) {
48 $username =
$state[
'forcedUsername'];
51 if (
$source->getRememberUsernameEnabled()) {
53 $params = $sessionHandler->getCookieParams();
55 $params[
'expire'] += (isset($_REQUEST[
'remember_username']) && $_REQUEST[
'remember_username'] ==
'Yes' ? 31536000 : -300);
59 if (
$source->isRememberMeEnabled()) {
60 if (array_key_exists(
'remember_me', $_REQUEST) && $_REQUEST[
'remember_me'] ===
'Yes') {
61 $state[
'RememberMe'] = TRUE;
78 if (array_key_exists(
'forcedUsername',
$state)) {
79 $t->data[
'username'] =
$state[
'forcedUsername'];
80 $t->data[
'forceUsername'] = TRUE;
81 $t->data[
'rememberUsernameEnabled'] = FALSE;
82 $t->data[
'rememberUsernameChecked'] = FALSE;
83 $t->data[
'rememberMeEnabled'] =
$source->isRememberMeEnabled();
84 $t->data[
'rememberMeChecked'] =
$source->isRememberMeChecked();
86 $t->data[
'username'] = $username;
87 $t->data[
'forceUsername'] = FALSE;
88 $t->data[
'rememberUsernameEnabled'] =
$source->getRememberUsernameEnabled();
89 $t->data[
'rememberUsernameChecked'] =
$source->getRememberUsernameChecked();
90 $t->data[
'rememberMeEnabled'] =
$source->isRememberMeEnabled();
91 $t->data[
'rememberMeChecked'] =
$source->isRememberMeChecked();
92 if (isset(
$_COOKIE[
$source->getAuthId() .
'-username']))
$t->data[
'rememberUsernameChecked'] = TRUE;
99 if (isset(
$state[
'SPMetadata'])) {
100 $t->data[
'SPMetadata'] =
$state[
'SPMetadata'];
102 $t->data[
'SPMetadata'] = NULL;
static handleLogin($authStateId, $username, $password)
Handle login request.
static getAllErrorCodeMessages()
Get a map of both errorcode titles and descriptions.
const AUTHID
The key of the AuthId field in the state.
static setCookie($name, $value, $params=null, $throw=true)
Set a cookie.
const STAGEID
The string used to identify our states.
static loadState($id, $stage, $allowMissing=false)
Retrieve saved state.
if(!array_key_exists('AuthState', $_REQUEST)) $authStateId
Create styles array
The data for the language used.
static getSessionHandler()
This function retrieves the current instance of the session handler.
if(!empty($_REQUEST['username'])||!empty($password)) $globalConfig
getParameters()
Retrieve the error parameters given when throwing this error.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
static getById($authId, $type=null)
Retrieve authentication source.
getErrorCode()
Retrieve the error code given when throwing this error.
static saveState(&$state, $stage, $rawId=false)
Save the state.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.