Changed ToSaml2DateTimeString extension to use XmlConvert.
- It's always better to use built in methods than homebrewn.
ValidUntil read from metadata.
- Stub tests for cacheDuration added, but not yet written.
CacheDuration read from metadata.
- IdentityProvider calculates a ValidUntil time based on the cacheduration.
Automatic reloading of idp metadata if it has expired.
Automatic scheduling of metadata reloading.
- Made the metadata loading for identity providers thread safe.
- IdentityProvider.MetadataValidUntil no longer triggers metadata reload.
Idp metadata automatic refresh retries if it fails.
Retry metadata load if initial load fails for idp.
Load metadata validUntil and cacheDuration for federations.
- Calculate a ValidUntil on the federation based on load time and cacheDuration in metadata.
- Introduced ICachedMetadata interface to be able to reuse code between Entity- and EntitiesDescriptors.
Automatic refresh of metadata from federations.
- Not removing idps that are no longer present in the metadata.
- Changed Federation constructors, now requires a metadata location - can't just supply metadata any more.
- Changed tests of Skolfederation and sambi metadata to use the metadataserver.
Missing Idps removed on federation refresh.
- An idp previously registered by a federation, that is now missing from the metadata is removed from the set of Idps.
Federation metadata is retried if the metadata can't be downloaded.
Remove idps that are no longer valid.
- Remove idps that are removed from the metadata.
- If the metadata is no longer valid and the load fails, remove all idps.
- The KeepsOldDataUntilMetadataBecomesInvalid test might be fragile due to timing. Hope I'm using big enough timeouts.
Removed debug output from Federation class.
- Wanted to have them commited at least once, to be able to resurrect if needed for debugging.
Updated calculation of MetadataValidTime for federations.
- It is required by the metadata specification that either a cacheDuration or validUntil element is present, so let's rely on that.
Removed double checked locking in IdentityProvider.
- Code coverage indicated that the inner test was optimized away, making it hard to know if it was actually correct.
- As long as nobody indicates that this is a performance bottleneck, the lock can be there.
Added Sso as recognized word for code analysis dictionary.
Added cacheDuration to stub idp metadata.
- Added serialization of cacheDuration when writing metadata to XML (including tests).
Automatic refresh of metadata.
- Metadata is automatically loaded periodically for idps and federations, based on cacheDuration and validUntil attributes.
- If metadata load is failing, the existing metadata is kept for as long as it is valid. Then the idps are removed/disabled.
- Fixes #129.