public static final String toJSON(AuthToken token) {
        try {
            return mapper.writer().writeValueAsString(token);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
public static final String toJSON ( AuthToken token ) { try { return mapper . writer ( ) . writeValueAsString ( token ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
Convert the auth token to a JSON string.
@param token the auth token
@return the token as json