You are here

public function JsonWebToken::unsetClaim 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::unsetClaim()

Remove a claim from the JWT payload.

@See Drupal\jwt\JsonWebTokenInterface::getClaim().

Parameters

mixed $claim: Either a string or indexed array of strings.

Overrides JsonWebTokenInterface::unsetClaim

File

src/JsonWebToken/JsonWebToken.php, line 57

Class

JsonWebToken
Class JsonWebToken.

Namespace

Drupal\jwt\JsonWebToken

Code

public function unsetClaim($claim) {
  $payload = $this->payload;
  $this
    ->internalUnsetClaim($payload, $claim);
  $this->payload = $payload;
}