ILIAS  trunk Revision v11.0_alpha-1861-g09f3d197f78
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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.

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

50  {
51  global $DIC;
52  $this->lng = $DIC->language();
53  }
global $DIC
Definition: shib_login.php:22
+ 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.

References $auth_user_id.

Referenced by ilAuthProviderSoap\doAuthentication().

128  : int
129  {
130  return $this->auth_user_id;
131  }
+ Here is the caller graph for this function:

◆ getInstance()

◆ getReason()

ilAuthStatus::getReason ( )

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

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

References $reason.

Referenced by getTranslatedReason().

103  : string
104  {
105  return $this->reason;
106  }
+ 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.

References $status.

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

◆ getTranslatedReason()

ilAuthStatus::getTranslatedReason ( )

Get translated reason.

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

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

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

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

87  : void
88  {
89  $this->reason = $a_reason;
90  }
+ Here is the caller graph for this function:

◆ setStatus()

◆ setTranslatedReason()

ilAuthStatus::setTranslatedReason ( string  $a_reason)

Set translated reason.

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

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

95  : void
96  {
97  $this->translated_reason = $a_reason;
98  }
+ 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.

◆ $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: