package com.huimv.video.dhicc.icc;

import com.dahuatech.icc.exception.ClientException;
import com.dahuatech.icc.oauth.http.DefaultClient;
import com.dahuatech.icc.oauth.http.IClient;
import com.dahuatech.icc.oauth.http.IccTokenResponse;
import com.dahuatech.icc.oauth.profile.GrantType;

//测试拿token的接口
public class IccDemo {

    public static void main(String[] args) {
        try {
            IClient client = new DefaultClient("36.26.62.70:447", "huimv", "1653d6c9-c611-4827-ac87-0bfd48deadd4");
            IccTokenResponse.IccToken clientToken = client.getAccessToken(GrantType.client_credentials);
            System.out.println(clientToken);
        } catch (ClientException e) {
            e.printStackTrace();
        }
    }
}
