You are here

public function JsonWebTokenInterface::setClaim in JSON Web Token Authentication (JWT) 8.0

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

Add or update the given claim with the given value.

Parameters

mixed $claim: Either a string or indexed array of strings representing the claim or nested claim to be set.

mixed $value: A serializable value to set the given claim to on the JWT.

1 method overrides JsonWebTokenInterface::setClaim()
JsonWebToken::setClaim in src/JsonWebToken/JsonWebToken.php
Add or update the given claim with the given value.

File

src/JsonWebToken/JsonWebTokenInterface.php, line 41

Class

JsonWebTokenInterface
Interface JsonWebTokenInterface.

Namespace

Drupal\jwt\JsonWebToken

Code

public function setClaim($claim, $value);