private async Task <AuthenticationResult> AcquireTokenForClientCommonAsync(string resource, ClientKey clientKey)
        {
            RequestData requestData = new RequestData
            {
                Authenticator           = this.Authenticator,
                TokenCache              = this.TokenCache,
                Resource                = resource,
                ClientKey               = clientKey,
                ExtendedLifeTimeEnabled = this.ExtendedLifeTimeEnabled
            };
            var handler = new AcquireTokenForClientHandler(requestData);

            return(await handler.RunAsync());
        }
        internal async Task <AuthenticationResult> AcquireTokenForClientCommonAsync(string resource, ClientKey clientKey)
        {
            RequestData requestData = new RequestData
            {
                Authenticator           = this.Authenticator,
                TokenCache              = this.TokenCache,
                Resource                = resource,
                ClientKey               = clientKey,
                ExtendedLifeTimeEnabled = this.ExtendedLifeTimeEnabled,
                SubjectType             = TokenSubjectType.Client
            };
            var handler = new AcquireTokenForClientHandler(requestData);

            return(await handler.RunAsync().ConfigureAwait(false));
        }
        private async Task <AuthenticationResult> AcquireTokenForClientCommonAsync(string resource, ClientKey clientKey, bool callSync = false)
        {
            var handler = new AcquireTokenForClientHandler(this.Authenticator, this.TokenCache, resource, clientKey, callSync);

            return(await handler.RunAsync());
        }
 private async Task<AuthenticationResult> AcquireTokenForClientCommonAsync(string resource, ClientKey clientKey)
 {
     var handler = new AcquireTokenForClientHandler(this.Authenticator, this.TokenCache, resource, clientKey);
     return await handler.RunAsync();
 }