public function JwtTranscoder::setSecret in JSON Web Token Authentication (JWT) 8.0
Same name and namespace in other branches
- 8 src/Transcoder/JwtTranscoder.php \Drupal\jwt\Transcoder\JwtTranscoder::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.
Overrides JwtTranscoderInterface::setSecret
1 call to JwtTranscoder::setSecret()
- JwtTranscoder::__construct in src/
Transcoder/ JwtTranscoder.php - Constructs a new JwtTranscoder.
File
- src/
Transcoder/ JwtTranscoder.php, line 124
Class
- JwtTranscoder
- Class JwtTranscoder.
Namespace
Drupal\jwt\TranscoderCode
public function setSecret($secret) {
$this->secret = $secret;
}