public function encode() : string
    {
        $segments = [
            $this->header->encode(),
            $this->payload->encode(),
            self::base64UrlEncode($this->signature)
        ];

        return implode('.', $segments);
    }
public function encode() : string
    {
        $segments = [
            $this->header->encode(),
            $this->payload->encode(),
            self::base64UrlEncode($this->signature)
        ];

        return implode('.', $segments);
    }
public function encode ( ) : string { $ segments = [ $ this -> header -> encode ( ) , $ this -> payload -> encode ( ) , self :: base64UrlEncode ( $ this -> signature ) ] ; return implode ( '.' , $ segments ) ; }
Encodes this token as a string

@return string The encoded string
Encodes this token as a string