You are here

public function JsonWebToken::__construct in JSON Web Token Authentication (JWT) 8.0

Same name and namespace in other branches
  1. 8 src/JsonWebToken/JsonWebToken.php \Drupal\jwt\JsonWebToken\JsonWebToken::__construct()

JsonWebToken constructor.

Parameters

object $jwt: The Object to turn into a JWT.

File

src/JsonWebToken/JsonWebToken.php, line 25

Class

JsonWebToken
Class JsonWebToken.

Namespace

Drupal\jwt\JsonWebToken

Code

public function __construct($jwt = NULL) {
  $jwt = is_null($jwt) ? new \stdClass() : $jwt;
  $this->payload = $jwt;
}