robe-auth/src/main/java/io/robe/auth/token/BasicToken.java
private String generateTokenString() throws Exception {
        //Renew age
        //Stringify token data
        StringBuilder dataString = new StringBuilder();
        dataString
                .append(getUserId())
                .append(SEPARATOR)
                .append(getUsername())
                .append(SEPARATOR)
                .append(getExpirationDate().getTime())
                .append(SEPARATOR)
                .append(attributesHash);

        // Encrypt token data string
        String newTokenString = encryptor.encrypt(dataString.toString());
        newTokenString = BaseEncoding.base16().encode(newTokenString.getBytes());
        tokenString = newTokenString;
        return newTokenString;
    }
private String generateTokenString() throws Exception {
        //Renew age
        //Stringify token data
        StringBuilder dataString = new StringBuilder();
        dataString
                .append(getUserId())
                .append(SEPARATOR)
                .append(getUsername())
                .append(SEPARATOR)
                .append(getExpirationDate().getTime())
                .append(SEPARATOR)
                .append(attributesHash);

        // Encrypt token data string
        String newTokenString = encryptor.encrypt(dataString.toString());
        newTokenString = BaseEncoding.base16().encode(newTokenString.getBytes());
        tokenString = newTokenString;
        return newTokenString;
    }
private String generateTokenString ( ) throws Exception { //Renew age //Stringify token data StringBuilder dataString = new StringBuilder ( ) ; dataString . append ( getUserId ( ) ) . append ( SEPARATOR ) . append ( getUsername ( ) ) . append ( SEPARATOR ) . append ( getExpirationDate ( ) . getTime ( ) ) . append ( SEPARATOR ) . append ( attributesHash ) ; // Encrypt token data string String newTokenString = encryptor . encrypt ( dataString . toString ( ) ) ; newTokenString = BaseEncoding . base16 ( ) . encode ( newTokenString . getBytes ( ) ) ; tokenString = newTokenString ; return newTokenString ; }
Generates a tokenString with a new expiration date and assigns it.

@return new tokenString
@throws Exception
Generates a tokenString with a new expiration date and assigns it .