Пример #1
0
        public RemoteTokenManager(IRemoteToken remoteToken, ITokenResponseHandler tokenResponseHandler)
        {
            _lock = new SemaphoreSlim(1, 1);

            _token                = null;
            _tokenExpiration      = null;
            _remoteToken          = remoteToken;
            _tokenResponseHandler = tokenResponseHandler;
            _tokenResponseHandler.SetRemoteTokenOptions(_remoteToken.Options);
        }
Пример #2
0
        public HttpClient GetHttpClient(IRemoteToken remoteToken, HttpMessageHandler handler)
        {
            ITokenManager tokenManager = new RemoteTokenManager(remoteToken);

            return(GetHttpClient(tokenManager, handler));
        }
Пример #3
0
 public RemoteTokenManager(IRemoteToken remoteToken)
     : this(remoteToken, new TokenResponseHandler())
 {
 }
Пример #4
0
        public HttpClient GetHttpClient(IRemoteToken remoteToken)
        {
            ITokenManager tokenManager = new RemoteTokenManager(remoteToken);

            return(GetHttpClient(tokenManager));
        }