You are here

public function JwtAuthValidEvent::__construct in JSON Web Token Authentication (JWT) 8

Same name and namespace in other branches
  1. 8.0 src/Authentication/Event/JwtAuthValidEvent.php \Drupal\jwt\Authentication\Event\JwtAuthValidEvent::__construct()

Constructs a JwtAuthEvent with a JsonWebToken.

Parameters

\Drupal\jwt\JsonWebToken\JsonWebTokenInterface $token: A decoded JWT.

Overrides JwtAuthBaseEvent::__construct

File

src/Authentication/Event/JwtAuthValidEvent.php, line 25

Class

JwtAuthValidEvent
Class JwtAuthValidEvent.

Namespace

Drupal\jwt\Authentication\Event

Code

public function __construct(JsonWebTokenInterface $token) {
  $this->user = User::getAnonymousUser();
  parent::__construct($token);
}