-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8a8007b
commit d574e53
Showing
10 changed files
with
197 additions
and
130 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
timeout: '+1 minute' | ||
disable: false | ||
secret: null | ||
strict: false |
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 |
---|---|---|
|
@@ -19,7 +19,6 @@ quant.token: | |
parent: quant | ||
weight: 2 | ||
|
||
|
||
quant.metadata: | ||
title: 'Metadata' | ||
route_name: quant.metadata | ||
|
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 |
---|---|---|
|
@@ -29,3 +29,4 @@ services: | |
- '@database' | ||
- '@request_stack' | ||
- '@config.factory' | ||
- '@datetime.time' |
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,63 @@ | ||
<?php | ||
|
||
namespace Drupal\quant\Exception; | ||
|
||
/** | ||
* The token has expired. | ||
*/ | ||
class StrictTokenException extends \Exception { | ||
|
||
/** | ||
* Request token. | ||
* | ||
* @var string | ||
*/ | ||
protected $token; | ||
|
||
/** | ||
* Request time. | ||
* | ||
* @var string | ||
*/ | ||
protected $tokenRoute; | ||
|
||
/** | ||
* The matched record. | ||
* | ||
* @var string | ||
*/ | ||
protected $expectedRoute; | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function __construct(string $token, $token_route = NULL, $expected_route = NULL, string $message = "The token routes do not match", int $code = 0, \Throwable $previous = NULL) { | ||
$this->token = $token; | ||
$this->tokenRoute = $token_route; | ||
$this->expectedRoute = $expected_route; | ||
|
||
parent::__construct($message, $code, $previous); | ||
} | ||
|
||
/** | ||
* Getter for the token. | ||
*/ | ||
public function getToken() { | ||
return $this->token; | ||
} | ||
|
||
/** | ||
* Getter for the time. | ||
*/ | ||
public function getTokenRoute() { | ||
return $this->tokenRoute; | ||
} | ||
|
||
/** | ||
* Getter for the database record. | ||
*/ | ||
public function getExpectedRoute() { | ||
return $this->expectedRoute; | ||
} | ||
|
||
} |
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
Oops, something went wrong.