JwtAuthGenerateEvent.php in JSON Web Token Authentication (JWT) 8.0
Same filename and directory in other branches
Namespace
Drupal\jwt\Authentication\EventFile
src/Authentication/Event/JwtAuthGenerateEvent.phpView source
<?php
namespace Drupal\jwt\Authentication\Event;
/**
* Class JwtAuthGenerateEvent.
*
* @package Drupal\jwt\Authentication\Event
*/
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);
}
}
Classes
Name | Description |
---|---|
JwtAuthGenerateEvent | Class JwtAuthGenerateEvent. |