public AssistantClient(OAuthCredentials oAuthCredentials, AuthenticationConf authenticationConf, AssistantConf assistantConf, DeviceModel deviceModel, DeviceDesc device)
        {
            this.authenticationConf = authenticationConf;
            this.assistantConf      = assistantConf;
            this.deviceModel        = deviceModel;
            this.device             = device;

            googleAuthFlow = new GoogleAuthorizationCodeFlow(new GoogleAuthorizationCodeFlow.Initializer()
            {
                ClientSecrets = new ClientSecrets()
                {
                    ClientId     = authenticationConf.clientId,
                    ClientSecret = authenticationConf.clientSecret,
                }
            });

            UpdateCredentials(oAuthCredentials);
        }
예제 #2
0
        public AuthenticationHelper(AuthenticationConf authenticationConf)
        {
            this.authenticationConf = authenticationConf;

            oAuthClient = new OAuthClient(authenticationConf.googleOAuthEndpoint);
        }