You are here

public function JwtTranscoder::setAlgorithm in JSON Web Token Authentication (JWT) 8.0

Same name and namespace in other branches
  1. 8 src/Transcoder/JwtTranscoder.php \Drupal\jwt\Transcoder\JwtTranscoder::setAlgorithm()

Sets the algorithm to be used for the JWT.

Parameters

string $algorithm: This can be any of the array keys returned by the getAlgorithmOptions function.

Overrides JwtTranscoderInterface::setAlgorithm

See also

getAlgorithmOptions()

1 call to JwtTranscoder::setAlgorithm()
JwtTranscoder::__construct in src/Transcoder/JwtTranscoder.php
Constructs a new JwtTranscoder.

File

src/Transcoder/JwtTranscoder.php, line 131

Class

JwtTranscoder
Class JwtTranscoder.

Namespace

Drupal\jwt\Transcoder

Code

public function setAlgorithm($algorithm) {
  $this->algorithm = $algorithm;
  $this->algorithmType = $this
    ->getAlgorithmType($algorithm);
}