Beispiel #1
0
        private void RetrieveMetadata()
        {
            _syncAfter = DateTimeOffset.UtcNow + _refreshInterval;
            IssuerSigningKeys metaData = WsFedMetadataRetriever.GetSigningKeys(_metadataEndpoint,
                                                                               _backchannelTimeout, _backchannelHttpHandler);

            _issuer = metaData.Issuer;
            _keys   = metaData.Keys;
        }
Beispiel #2
0
        private void RetrieveMetadata()
        {
            if (_syncAfter >= DateTimeOffset.UtcNow)
            {
                return;
            }

            _synclock.EnterWriteLock();
            try
            {
                IssuerSigningKeys metaData = WsFedMetadataRetriever.GetSigningKeys(_metadataEndpoint,
                                                                                   _backchannelTimeout, _backchannelHttpHandler);
                _issuer    = metaData.Issuer;
                _tokens    = metaData.Tokens;
                _syncAfter = DateTimeOffset.UtcNow + _refreshInterval;
            }
            finally
            {
                _synclock.ExitWriteLock();
            }
        }