ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\Authentication\Setup\SessionReminderKeyCreatedObjective Class Reference

Creates the secret key used to encrypt the session reminder tokens. More...

+ Inheritance diagram for ILIAS\Authentication\Setup\SessionReminderKeyCreatedObjective:
+ Collaboration diagram for ILIAS\Authentication\Setup\SessionReminderKeyCreatedObjective:

Public Member Functions

 getArtifactName ()
 
 getLabel ()
 Get a label that describes this objective. More...
 
 build ()
 
 isApplicable (Environment $environment)
 Get to know whether the objective is applicable. More...
 
- Public Member Functions inherited from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective
 getArtifactName ()
 
 build ()
 
 buildIn (Environment $env)
 
 getPreconditions (Environment $environment)
 Objectives might depend on other objectives. More...
 
 getHash ()
 Get a hash for this objective. More...
 
 getLabel ()
 Get a label that describes this objective. More...
 
 isNotable ()
 Get to know if this is an interesting objective for a human. More...
 
 achieve (Environment $environment)
 Objectives can be achieved. More...
 
 isApplicable (Environment $environment)
 Get to know whether the objective is applicable. More...
 
 getHash ()
 Get a hash for this objective. More...
 
 getLabel ()
 Get a label that describes this objective. More...
 
 isNotable ()
 Get to know if this is an interesting objective for a human. More...
 
 getPreconditions (Environment $environment)
 Objectives might depend on other objectives. More...
 
 achieve (Environment $environment)
 Objectives can be achieved. More...
 
 isApplicable (Environment $environment)
 Get to know whether the objective is applicable. More...
 

Data Fields

const string KEY = 'key'
 

Private Attributes

const int KEY_LENGTH_IN_BYTES = 32
 

Additional Inherited Members

- Static Public Member Functions inherited from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective
static PATH ()
 
- Protected Member Functions inherited from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective
 getPath ()
 
 makeDirectoryFor (string $path)
 
- Static Protected Member Functions inherited from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective
static saveName (string $name)
 

Detailed Description

Creates the secret key used to encrypt the session reminder tokens.

The key is stored in the (shared) data directory, so all web servers of a multi-server setup use the same key.

An existing key is never replaced. To renew the key, delete the file and run the setup again.

Definition at line 34 of file SessionReminderKeyCreatedObjective.php.

Member Function Documentation

◆ build()

ILIAS\Authentication\Setup\SessionReminderKeyCreatedObjective::build ( )

Reimplemented from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective.

Definition at line 49 of file SessionReminderKeyCreatedObjective.php.

49 : Artifact
50 {
51 return new ArrayArtifact([
52 self::KEY => bin2hex(random_bytes(self::KEY_LENGTH_IN_BYTES)),
53 ]);
54 }

◆ getArtifactName()

ILIAS\Authentication\Setup\SessionReminderKeyCreatedObjective::getArtifactName ( )

Reimplemented from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective.

Definition at line 39 of file SessionReminderKeyCreatedObjective.php.

39 : string
40 {
41 return 'session_reminder_key';
42 }

◆ getLabel()

ILIAS\Authentication\Setup\SessionReminderKeyCreatedObjective::getLabel ( )

Get a label that describes this objective.

Reimplemented from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective.

Definition at line 44 of file SessionReminderKeyCreatedObjective.php.

44 : string
45 {
46 return 'Create the encryption key of the session reminder';
47 }

◆ isApplicable()

ILIAS\Authentication\Setup\SessionReminderKeyCreatedObjective::isApplicable ( Environment  $environment)

Get to know whether the objective is applicable.

Don't change the environment or cause changes on services in the environment. Just check if this objective needs to be achieved, either currently or at all. In case of doubt whether the objective is applicable or not return true.

Reimplemented from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective.

Definition at line 56 of file SessionReminderKeyCreatedObjective.php.

56 : bool
57 {
58 return !is_file(self::PATH());
59 }

Field Documentation

◆ KEY

const string ILIAS\Authentication\Setup\SessionReminderKeyCreatedObjective::KEY = 'key'

◆ KEY_LENGTH_IN_BYTES

const int ILIAS\Authentication\Setup\SessionReminderKeyCreatedObjective::KEY_LENGTH_IN_BYTES = 32
private

Definition at line 37 of file SessionReminderKeyCreatedObjective.php.


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