private async Task <MsalTokenResponse> AcquireTokenSilentViaBrokerAsync(BrokerRequest brokerRequest)
        {
            // Don't send silent background request if account information is not provided
            using (_logger.LogMethodDuration())
            {
                _logger.Verbose("[Android broker] User is specified for silent token request. Starting silent Android broker request. ");
                string silentResult = await GetBrokerAuthTokenSilentlyAsync(brokerRequest).ConfigureAwait(false);

                return(_brokerHelper.HandleSilentAuthenticationResult(silentResult, brokerRequest.CorrelationId));
            }
        }
Пример #2
0
        private async Task <MsalTokenResponse> AcquireTokenSilentViaBrokerAsync(BrokerRequest brokerRequest)
        {
            using (_logger.LogMethodDuration())
            {
                _logger.Verbose("[Android broker] User is specified for silent token request. Starting silent request. ");

                var accountData = await GetBrokerAccountDataAsync(brokerRequest).ConfigureAwait(false);

                brokerRequest = _brokerHelper.UpdateBrokerRequestWithAccountData(accountData, brokerRequest);

                string silentResult = await AcquireTokenSilentFromBrokerInternalAsync(brokerRequest).ConfigureAwait(false);

                return(_brokerHelper.HandleSilentAuthenticationResult(silentResult, brokerRequest.CorrelationId));
            }
        }