Lcobucci\JWT\Builder::getToken PHP Method

getToken() public method

Returns the resultant token
public getToken ( ) : Token
return Token
    public function getToken() : Token
    {
        $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((string) $this->signature);
        }
        return new Token($this->headers, $this->claims, $this->signature, $payload);
    }

Usage Example

 public function __toString()
 {
     return $this->token->getToken()->__toString();
 }
All Usage Examples Of Lcobucci\JWT\Builder::getToken