public GraphController(GraphAuthenticator authenticator, GraphService service)
        {
            _graphAuthenticator = authenticator;
            _graphService       = service;

            _graphService.Authenticate(_graphAuthenticator);
        }
Exemple #2
0
    public static async Task <string> Auth()         //登陆
    {
        var Auth     = new GraphAuthenticator();     //创建认证实例
        var clientAU = new GraphServiceClient(Auth); //创建客户端代理
        await clientAU.Me.Request().GetAsync();      //认证请求

        string temp = await Auth.returnToken();

        //打印token
        Debug.Log("Token: " + temp);
        return(temp);
    }