Ejemplo n.º 1
0
 /**
  * Returns the resultant token
  *
  * @return Token
  */
 public function getToken()
 {
     $payload = [$this->encoder->base64UrlEncode($this->encoder->jsonEncode($this->headers)), $this->encoder->base64UrlEncode($this->encoder->jsonEncode($this->claims))];
     if ($this->signature !== null) {
         $payload[] = $this->encoder->base64UrlEncode($this->signature);
     }
     return new Token($this->headers, $this->claims, $this->signature, $payload);
 }