class JwtAuthGenerateEvent in JSON Web Token Authentication (JWT) 8.0
Same name and namespace in other branches
- 8 src/Authentication/Event/JwtAuthGenerateEvent.php \Drupal\jwt\Authentication\Event\JwtAuthGenerateEvent
Class JwtAuthGenerateEvent.
@package Drupal\jwt\Authentication\Event
Hierarchy
- class \Drupal\jwt\Authentication\Event\JwtAuthBaseEvent extends \Symfony\Component\EventDispatcher\Event
- class \Drupal\jwt\Authentication\Event\JwtAuthGenerateEvent
Expanded class hierarchy of JwtAuthGenerateEvent
2 files declare their use of JwtAuthGenerateEvent
- JwtAuth.php in src/
Authentication/ Provider/ JwtAuth.php - JwtAuthIssuerSubscriber.php in modules/
jwt_auth_issuer/ src/ EventSubscriber/ JwtAuthIssuerSubscriber.php
File
- src/
Authentication/ Event/ JwtAuthGenerateEvent.php, line 10
Namespace
Drupal\jwt\Authentication\EventView source
class JwtAuthGenerateEvent extends JwtAuthBaseEvent {
/**
* Adds a claim to a JsonWebToken.
*
* @see \Drupal\jwt\JsonWebToken\JsonWebTokenInterface::setClaim()
*/
public function addClaim($claim, $value) {
$this->jwt
->setClaim($claim, $value);
}
/**
* Removes a claim from a JsonWebToken.
*
* @see \Drupal\jwt\JsonWebToken\JsonWebTokenInterface::unsetClaim()
*/
public function removeClaim($claim) {
$this->jwt
->unsetClaim($claim);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
JwtAuthBaseEvent:: |
protected | property | The JsonWebToken. | |
JwtAuthBaseEvent:: |
public | function | Returns the JWT. | |
JwtAuthBaseEvent:: |
public | function | Constructs a JwtAuthEvent with a JsonWebToken. | 1 |
JwtAuthGenerateEvent:: |
public | function | Adds a claim to a JsonWebToken. | |
JwtAuthGenerateEvent:: |
public | function | Removes a claim from a JsonWebToken. |