package com.vaessl.app.connection;

import java.time.Instant;
import java.util.Map;

public record ConnectionResponse(String token, Instant expiresAt,
        Map<String, Object> extraResponseData) {

    public String getExtraVar(String key) {
        if (extraResponseData == null) {
            return null;
        } else {
            Object value = extraResponseData.get(key);

            return value != null ? String.valueOf(value) : null;
        }
    }
}
