ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilAuthStatus Class Reference
+ Collaboration diagram for ilAuthStatus:

Public Member Functions

 setStatus (int $a_status)
 Set auth status. More...
 
 getStatus ()
 Get status. More...
 
 setReason (string $a_reason)
 Set reason. More...
 
 setTranslatedReason (string $a_reason)
 Set translated reason. More...
 
 getReason ()
 Get reason for authentication success, fail, migration... More...
 
 getTranslatedReason ()
 Get translated reason. More...
 
 setAuthenticatedUserId (int $a_id)
 
 getAuthenticatedUserId ()
 Get authenticated user id. More...
 

Static Public Member Functions

static getInstance ()
 Get status instance. More...
 

Data Fields

const int STATUS_UNDEFINED = 1
 
const int STATUS_AUTHENTICATED = 2
 
const int STATUS_AUTHENTICATION_FAILED = 3
 
const int STATUS_ACCOUNT_MIGRATION_REQUIRED = 4
 
const int STATUS_CODE_ACTIVATION_REQUIRED = 5
 

Private Member Functions

 __construct ()
 Constructor. More...
 

Private Attributes

ilLanguage $lng
 
int $status = self::STATUS_UNDEFINED
 
string $reason = ''
 
string $translated_reason = ''
 
int $auth_user_id = 0
 

Static Private Attributes

static ilAuthStatus $instance = null
 

Detailed Description

Definition at line 21 of file class.ilAuthStatus.php.

Constructor & Destructor Documentation

◆ __construct()

ilAuthStatus::__construct ( )
private

Constructor.

Definition at line 43 of file class.ilAuthStatus.php.

References $DIC, and ILIAS\Repository\lng().

44  {
45  global $DIC;
46  $this->lng = $DIC->language();
47  }
global $DIC
Definition: shib_login.php:26
+ Here is the call graph for this function:

Member Function Documentation

◆ getAuthenticatedUserId()

ilAuthStatus::getAuthenticatedUserId ( )

Get authenticated user id.

Definition at line 122 of file class.ilAuthStatus.php.

References $auth_user_id.

Referenced by ilAuthProviderSoap\doAuthentication().

122  : int
123  {
124  return $this->auth_user_id;
125  }
+ Here is the caller graph for this function:

◆ getInstance()

◆ getReason()

ilAuthStatus::getReason ( )

Get reason for authentication success, fail, migration...

Definition at line 97 of file class.ilAuthStatus.php.

References $reason.

Referenced by getTranslatedReason().

97  : string
98  {
99  return $this->reason;
100  }
+ Here is the caller graph for this function:

◆ getStatus()

ilAuthStatus::getStatus ( )

Get status.

Returns
int $status

Definition at line 72 of file class.ilAuthStatus.php.

References $status.

72  : int
73  {
74  return $this->status;
75  }

◆ getTranslatedReason()

ilAuthStatus::getTranslatedReason ( )

Get translated reason.

Definition at line 105 of file class.ilAuthStatus.php.

References $translated_reason, getReason(), and ILIAS\Repository\lng().

105  : string
106  {
107  if ($this->translated_reason !== '') {
109  }
110  return $this->lng->txt($this->getReason());
111  }
getReason()
Get reason for authentication success, fail, migration...
+ Here is the call graph for this function:

◆ setAuthenticatedUserId()

◆ setReason()

ilAuthStatus::setReason ( string  $a_reason)

Set reason.

Parameters
string$a_reasonA laguage key, which can be translated to an end user message

Definition at line 81 of file class.ilAuthStatus.php.

Referenced by ilAuthProviderShibboleth\doAuthentication(), ilAuthProviderLTI\findGlobalRole(), ilAuthProvider\handleAuthenticationFail(), ilAuthProviderSoap\handleSoapAuth(), and ilAuthProviderOpenIdConnect\handleUpdate().

81  : void
82  {
83  $this->reason = $a_reason;
84  }
+ Here is the caller graph for this function:

◆ setStatus()

◆ setTranslatedReason()

ilAuthStatus::setTranslatedReason ( string  $a_reason)

Set translated reason.

Definition at line 89 of file class.ilAuthStatus.php.

Referenced by ilAuthProviderOpenIdConnect\doAuthentication(), ilAuthProviderSoap\doAuthentication(), and ilAuthProviderSoap\handleSoapAuth().

89  : void
90  {
91  $this->translated_reason = $a_reason;
92  }
+ Here is the caller graph for this function:

Field Documentation

◆ $auth_user_id

int ilAuthStatus::$auth_user_id = 0
private

Definition at line 36 of file class.ilAuthStatus.php.

Referenced by getAuthenticatedUserId().

◆ $instance

ilAuthStatus ilAuthStatus::$instance = null
staticprivate

Definition at line 23 of file class.ilAuthStatus.php.

◆ $lng

ilLanguage ilAuthStatus::$lng
private

Definition at line 25 of file class.ilAuthStatus.php.

◆ $reason

string ilAuthStatus::$reason = ''
private

Definition at line 34 of file class.ilAuthStatus.php.

Referenced by getReason().

◆ $status

int ilAuthStatus::$status = self::STATUS_UNDEFINED
private

Definition at line 33 of file class.ilAuthStatus.php.

Referenced by getStatus().

◆ $translated_reason

string ilAuthStatus::$translated_reason = ''
private

Definition at line 35 of file class.ilAuthStatus.php.

Referenced by getTranslatedReason().

◆ STATUS_ACCOUNT_MIGRATION_REQUIRED

◆ STATUS_AUTHENTICATED

◆ STATUS_AUTHENTICATION_FAILED

◆ STATUS_CODE_ACTIVATION_REQUIRED

const int ilAuthStatus::STATUS_CODE_ACTIVATION_REQUIRED = 5

◆ STATUS_UNDEFINED

const int ilAuthStatus::STATUS_UNDEFINED = 1

Definition at line 27 of file class.ilAuthStatus.php.

Referenced by ilAuthFrontend\resetStatus().


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