ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAuthStatus Class Reference

Auth status implementation. More...

+ Collaboration diagram for ilAuthStatus:

Public Member Functions

 setStatus ($a_status)
 Set auth status. More...
 
 getStatus ()
 Get status. More...
 
 setReason ($a_reason)
 Set reason. More...
 
 setTranslatedReason ($a_reason)
 Set translated reason. More...
 
 getReason ()
 Get reason for authentication success, fail, migration... More...
 
 getTranslatedReason ()
 Get translated reason. More...
 
 setAuthenticatedUserId ($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
 

Protected Member Functions

 getLogger ()
 Get logger. More...
 

Private Member Functions

 __construct ()
 Constructor. More...
 

Private Attributes

 $logger = null
 
 $status = self::STATUS_UNDEFINED
 
 $reason = ''
 
 $translated_reason = ''
 
 $auth_user_id = 0
 

Static Private Attributes

static $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 11 of file class.ilAuthStatus.php.

Constructor & Destructor Documentation

◆ __construct()

ilAuthStatus::__construct ( )
private

Constructor.

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

References ilLoggerFactory\getLogger().

34  {
35  $this->logger = ilLoggerFactory::getLogger('auth');
36  }
static getLogger($a_component_id)
Get component logger.
+ Here is the call graph for this function:

Member Function Documentation

◆ getAuthenticatedUserId()

ilAuthStatus::getAuthenticatedUserId ( )

Get authenticated user id.

Returns
int

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

References $auth_user_id.

Referenced by ilAuthProviderSoap\doAuthentication().

126  {
127  return $this->auth_user_id;
128  }
+ Here is the caller graph for this function:

◆ getInstance()

◆ getLogger()

ilAuthStatus::getLogger ( )
protected

Get logger.

Returns

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

References $logger.

55  {
56  return $this->logger;
57  }

◆ getReason()

ilAuthStatus::getReason ( )

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

Returns
string

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

References $reason.

Referenced by getTranslatedReason().

100  {
101  return $this->reason;
102  }
+ 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.

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

◆ getTranslatedReason()

ilAuthStatus::getTranslatedReason ( )

Get translated reason.

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

References $GLOBALS, $translated_reason, and getReason().

108  {
109  if (strlen($this->translated_reason)) {
111  }
112  return $GLOBALS['DIC']->language()->txt($this->getReason());
113  }
getReason()
Get reason for authentication success, fail, migration...
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
+ Here is the call graph for this function:

◆ setAuthenticatedUserId()

◆ setReason()

ilAuthStatus::setReason (   $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(), ilAuthProvider\handleAuthenticationFail(), ilAuthProviderSoap\handleSoapAuth(), and ilAuthProviderOpenIdConnect\handleUpdate().

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

◆ setStatus()

◆ setTranslatedReason()

ilAuthStatus::setTranslatedReason (   $a_reason)

Set translated reason.

Parameters
string$a_reason

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

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

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

Field Documentation

◆ $auth_user_id

ilAuthStatus::$auth_user_id = 0
private

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

Referenced by getAuthenticatedUserId().

◆ $instance

ilAuthStatus::$instance = null
staticprivate

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

◆ $logger

ilAuthStatus::$logger = null
private

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

Referenced by getLogger().

◆ $reason

ilAuthStatus::$reason = ''
private

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

Referenced by getReason().

◆ $status

ilAuthStatus::$status = self::STATUS_UNDEFINED
private

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

Referenced by getStatus().

◆ $translated_reason

ilAuthStatus::$translated_reason = ''
private

Definition at line 25 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 17 of file class.ilAuthStatus.php.

Referenced by ilAuthFrontend\resetStatus().


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