ILIAS  release_8 Revision v8.24
ilAuthStatus Class Reference

Auth status implementation. More...

+ 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 STATUS_UNDEFINED = 1
 
const STATUS_AUTHENTICATED = 2
 
const STATUS_AUTHENTICATION_FAILED = 3
 
const STATUS_ACCOUNT_MIGRATION_REQUIRED = 4
 
const 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

Auth status implementation.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

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

Constructor & Destructor Documentation

◆ __construct()

ilAuthStatus::__construct ( )
private

Constructor.

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

50 {
51 global $DIC;
52 $this->lng = $DIC->language();
53 }
global $DIC
Definition: feed.php:28

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

+ Here is the call graph for this function:

Member Function Documentation

◆ getAuthenticatedUserId()

ilAuthStatus::getAuthenticatedUserId ( )

Get authenticated user id.

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

128 : int
129 {
130 return $this->auth_user_id;
131 }

References $auth_user_id.

◆ getInstance()

◆ getReason()

ilAuthStatus::getReason ( )

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

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

103 : string
104 {
105 return $this->reason;
106 }

References $reason.

Referenced by getTranslatedReason().

+ Here is the caller graph for this function:

◆ getStatus()

ilAuthStatus::getStatus ( )

Get status.

Returns
int $status

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

78 : int
79 {
80 return $this->status;
81 }

References $status.

◆ getTranslatedReason()

ilAuthStatus::getTranslatedReason ( )

Get translated reason.

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

111 : string
112 {
113 if ($this->translated_reason !== '') {
115 }
116 return $this->lng->txt($this->getReason());
117 }
getReason()
Get reason for authentication success, fail, migration...

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

+ Here is the call graph for this function:

◆ setAuthenticatedUserId()

ilAuthStatus::setAuthenticatedUserId ( int  $a_id)

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

120 : void
121 {
122 $this->auth_user_id = $a_id;
123 }

◆ 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 87 of file class.ilAuthStatus.php.

87 : void
88 {
89 $this->reason = $a_reason;
90 }

◆ setStatus()

ilAuthStatus::setStatus ( int  $a_status)

Set auth status.

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

69 : void
70 {
71 $this->status = $a_status;
72 }

Referenced by ilAuthProviderCAS\doAuthentication(), ilAuthProviderECS\handleLoginByAuthMode(), and ilAuthProviderSaml\handleSamlAuth().

+ Here is the caller graph for this function:

◆ setTranslatedReason()

ilAuthStatus::setTranslatedReason ( string  $a_reason)

Set translated reason.

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

95 : void
96 {
97 $this->translated_reason = $a_reason;
98 }

Referenced by ilAuthProviderSoap\handleSoapAuth().

+ Here is the caller graph for this function:

Field Documentation

◆ $auth_user_id

int ilAuthStatus::$auth_user_id = 0
private

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

Referenced by getAuthenticatedUserId().

◆ $instance

ilAuthStatus ilAuthStatus::$instance = null
staticprivate

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

Referenced by getInstance().

◆ $lng

ilLanguage ilAuthStatus::$lng
private

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

◆ $reason

string ilAuthStatus::$reason = ''
private

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

Referenced by getReason().

◆ $status

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

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

Referenced by getStatus().

◆ $translated_reason

string ilAuthStatus::$translated_reason = ''
private

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

Referenced by getTranslatedReason().

◆ STATUS_ACCOUNT_MIGRATION_REQUIRED

◆ STATUS_AUTHENTICATED

◆ STATUS_AUTHENTICATION_FAILED

◆ STATUS_CODE_ACTIVATION_REQUIRED

const ilAuthStatus::STATUS_CODE_ACTIVATION_REQUIRED = 5

◆ STATUS_UNDEFINED

const ilAuthStatus::STATUS_UNDEFINED = 1

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

Referenced by ilAuthFrontend\resetStatus().


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