Exemple #1
0
 public AzureAuthenticatorService(IAzurePlatformParameters azurePlatformParameters,
                                  IPlatformHttpClientHandler httpClientHandler,
                                  ILoggingService loggingService)
 {
     _azurePlatformParameters = azurePlatformParameters;
     _httpClient     = httpClientHandler.CreateHandler();
     _loggingService = loggingService;
 }
        public SPListService(
            ILoggingService loggingService,
            IPlatformHttpClientHandler platformHttpClientHandler,
            IAzureAuthenticatorEndpointService azureAuthenticatorEndpointService)
        {
            _loggingService = loggingService;
            _httpClientHandler = platformHttpClientHandler;
            _azureAuthenticatorEndpointService = azureAuthenticatorEndpointService;

            _httpClient = _httpClientHandler.GetHttpClient();
        }
Exemple #3
0
        public GraphService(
            ILoggingService loggingService,
            IPlatformHttpClientHandler platformHttpClientHandler,
            IAzureAuthenticatorEndpointService azureAuthenticatorEndpointService)
        {
            _loggingService    = loggingService;
            _httpClientHandler = platformHttpClientHandler;
            _azureAuthenticatorEndpointService = azureAuthenticatorEndpointService;

            //get httpclient and token for accessing graph api
            _httpClient = _httpClientHandler.GetHttpClient();
        }
        public static AzureAuthenticatorService GetAzureAuthenticator(
            IAzurePlatformParameters parameters    = null,
            IPlatformHttpClientHandler httpHandler = null,
            ILoggingService loggingService         = null
            )
        {
            if (parameters == null)
            {
                parameters = new AzurePlatformParameters();
            }
            if (httpHandler == null)
            {
                httpHandler = new IosHttpClientHandler();
            }

            return(new AzureAuthenticatorService(parameters,
                                                 httpHandler,
                                                 loggingService));
        }