{{ message }}
Add Auth.getLastMessageIssueInstant and Auth.getLastRequestIssueInstant#320
Merged
pitbulk merged 2 commits intoJun 24, 2021
Merged
Conversation
Each message (AuthnRequest, SamlResponse, LogoutRequest and LogoutResponse) have been enhanced to expose their issue instant. This is useful for logging purposes (i.e.: you want to track each request you generate and each response you receive, along with their issue instant), which is also required when implementing a SPID Service Provider (SPID is a SAML 2.0-based federated system used by the Italian government). I also tried to implement some tests for Auth, but I did not succeed for the "received message" scenario, because, to be coherent with the "last message id" case, the "last message issue instant" information is set on the Auth instance only if the message processing succeeds (i.e.: the processed message is valid). The test data used here seems to fail validation because of time expiration (which is reasonable), so testing these methods in the "receive" scenario would require to write test messages with valid timestamps dynamically.
Contributor
Author
ab7e4d7 to
3c79c8c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Each message (AuthnRequest, SamlResponse, LogoutRequest and
LogoutResponse) have been enhanced to expose their issue instant. This
is useful for logging purposes (i.e.: you want to track each request
you generate and each response you receive, along with their issue
instant), which is also required when implementing a SPID Service
Provider (SPID is a SAML 2.0-based federated system used by the Italian
government).
I also tried to implement some tests for Auth, but I did not succeed for
the "received message" scenario, because, to be coherent with the "last
message id" case, the "last message issue instant" information is set
on the Auth instance only if the message processing succeeds (i.e.: the
processed message is valid). The test data used here seems to fail
validation because of time expiration (which is reasonable), so testing
these methods in the "receive" scenario would require to write test
messages with valid timestamps dynamically.