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
common/auth/src/main/java/io/apiman/common/auth/AuthTokenUtil.java