You are here

public function JwtTranscoderInterface::setSecret in JSON Web Token Authentication (JWT) 8

Same name and namespace in other branches
  1. 8.0 src/Transcoder/JwtTranscoderInterface.php \Drupal\jwt\Transcoder\JwtTranscoderInterface::setSecret()

Sets the secret that is used for a symmetric algorithm signature.

The secret is only used when a symmetric algorithm is selected. Currently the symmetric algorithms supported are:

  • HS256
  • HS384
  • HS512

The secret is used for both signature creation and verification.

Parameters

string $secret: The secret for the JWT.

1 method overrides JwtTranscoderInterface::setSecret()
JwtTranscoder::setSecret in src/Transcoder/JwtTranscoder.php
Sets the secret that is used for a symmetric algorithm signature.

File

src/Transcoder/JwtTranscoderInterface.php, line 51

Class

JwtTranscoderInterface
Interface JwtTranscoderInterface.

Namespace

Drupal\jwt\Transcoder

Code

public function setSecret($secret);