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.

34 {
35 $this->logger = ilLoggerFactory::getLogger('auth');
36 }
static getLogger($a_component_id)
Get component logger.

References ilLoggerFactory\getLogger().

+ 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.

126 {
127 return $this->auth_user_id;
128 }

References $auth_user_id.

◆ getInstance()

◆ getLogger()

ilAuthStatus::getLogger ( )
protected

Get logger.

Returns
\ilLogger

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

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

References $logger.

◆ getReason()

ilAuthStatus::getReason ( )

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

Returns
string

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

100 {
101 return $this->reason;
102 }

References $reason.

Referenced by getTranslatedReason().

+ 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.

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

References $status.

◆ getTranslatedReason()

ilAuthStatus::getTranslatedReason ( )

Get translated reason.

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

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.

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

+ Here is the call graph for this function:

◆ setAuthenticatedUserId()

ilAuthStatus::setAuthenticatedUserId (   $a_id)

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

117 {
118 $this->auth_user_id = $a_id;
119 }

◆ 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.

82 {
83 $this->reason = $a_reason;
84 }

◆ setStatus()

ilAuthStatus::setStatus (   $a_status)

Set auth status.

Parameters
int$a_status

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

64 {
65 $this->status = $a_status;
66 }

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

+ Here is the caller graph for this function:

◆ setTranslatedReason()

ilAuthStatus::setTranslatedReason (   $a_reason)

Set translated reason.

Parameters
string$a_reason

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

91 {
92 $this->translated_reason = $a_reason;
93 }

Referenced by ilAuthProviderSoap\handleSoapAuth().

+ 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.

Referenced by getInstance().

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