This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace requireRunToken feature with runTokenHash configuration
The `run_token_hash.cache` file is no longer used. Closes #327.
- Loading branch information
1 parent
1892f91
commit a7e7d6a
Showing
9 changed files
with
37 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?php | ||
/** | ||
* Refresh run token. | ||
* | ||
* @author Timo Tijhof | ||
* @since 1.0.0 | ||
* @package TestSwarm | ||
*/ | ||
define( 'SWARM_ENTRY', 'SCRIPT' ); | ||
require_once __DIR__ . '/../inc/init.php'; | ||
|
||
class GenerateRunTokenScript extends MaintenanceScript { | ||
|
||
protected function init() { | ||
$this->setDescription( | ||
'Generates a new run token for clients and its hash for the configuration file.' | ||
); | ||
} | ||
|
||
protected function execute() { | ||
$runToken = sha1( mt_rand() ); | ||
$runTokenHash = sha1( $runToken ); | ||
$this->out( "New run token: $runToken" ); | ||
$this->out( "New token hash: $runTokenHash" ); | ||
} | ||
} | ||
|
||
$script = GenerateRunTokenScript::newFromContext( $swarmContext ); | ||
$script->run(); |
This file was deleted.
Oops, something went wrong.