13 if (!array_key_exists(
'AuthState', $_REQUEST)) {
26 if (array_key_exists(
'username', $_REQUEST)) {
27 $username = $_REQUEST[
'username'];
28 } elseif (
$source->getRememberUsernameEnabled() && array_key_exists(
$source->getAuthId() .
'-username',
$_COOKIE)) {
30 } elseif (isset(
$state[
'core:username'])) {
31 $username = (string)
$state[
'core:username'];
36 if (array_key_exists(
'password', $_REQUEST)) {
42 if (array_key_exists(
'organization', $_REQUEST)) {
43 $organization = $_REQUEST[
'organization'];
44 } elseif (isset(
$state[
'core:organization'])) {
45 $organization = (string)
$state[
'core:organization'];
53 if (!empty($username) && !empty(
$password)) {
55 if (
$source->getRememberUsernameEnabled()) {
57 $params = $sessionHandler->getCookieParams();
59 $params[
'expire'] += (isset($_REQUEST[
'remember_username']) && $_REQUEST[
'remember_username'] ==
'Yes' ? 31536000 : -300);
76 $t->data[
'username'] = $username;
77 $t->data[
'forceUsername'] = FALSE;
78 $t->data[
'rememberUsernameEnabled'] =
$source->getRememberUsernameEnabled();
79 $t->data[
'rememberUsernameChecked'] =
$source->getRememberUsernameChecked();
80 $t->data[
'rememberMeEnabled'] =
false;
81 $t->data[
'rememberMeChecked'] =
false;
82 if (isset(
$_COOKIE[
$source->getAuthId() .
'-username']))
$t->data[
'rememberUsernameChecked'] = TRUE;
88 $t->data[
'selectedOrg'] = $organization;
92 if (isset(
$state[
'SPMetadata'])) {
93 $t->data[
'SPMetadata'] =
$state[
'SPMetadata'];
95 $t->data[
'SPMetadata'] = NULL;
static handleLogin($authStateId, $username, $password, $organization)
Handle login request.
if($organizations===NULL||!empty($organization)) $globalConfig
const AUTHID
The key of the AuthId field in the state.
if($source===NULL) $organizations
static getAllErrorCodeMessages()
Get a map of both errorcode titles and descriptions.
static listOrganizations($authStateId)
Get available organizations.
static setCookie($name, $value, $params=null, $throw=true)
Set a cookie.
if(!array_key_exists('AuthState', $_REQUEST)) $authStateId
static loadState($id, $stage, $allowMissing=false)
Retrieve saved state.
static getSessionHandler()
This function retrieves the current instance of the session handler.
getParameters()
Retrieve the error parameters given when throwing this error.
static getById($authId, $type=null)
Retrieve authentication source.
getErrorCode()
Retrieve the error code given when throwing this error.
static getInstance($instancename='simplesaml')
Get a configuration file by its instance name.
const STAGEID
The string used to identify our states.