Skip to content

Accept multiple SessionIndex elements in SP-initated LogoutRequests#117

Merged
4 commits merged intomasterfrom
logout-req-multiple-session-indices
Feb 23, 2021
Merged

Accept multiple SessionIndex elements in SP-initated LogoutRequests#117
4 commits merged intomasterfrom
logout-req-multiple-session-indices

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Feb 12, 2021

Description

Adds support for multiple SessionIndex elements in SP-initiated LogoutRequests in accordance with the specification:

3.7.3.2 Session Authority Rules

Terminate the principal's current session as specified by the saml:BaseID, saml:NameID,or saml:EncryptedID element, and any elements present in the logoutrequest message.

⚠️ This is a breaking change in the SessionParticipants API and requires a major version bump ⚠️

The changes introduced in this PR:

  • All SessionIndex value in an SP-initiated logout request are extracted (previously only the first one)
  • SessionParticipants#get can be called with either an array of session indices or a single session index (previously only a single session index string value)

References

Testing

  • This change adds test coverage for new/changed/fixed functionality

Comment on lines +68 to 72
* @serviceProviderId {string} The serviceProviderId value of the session participant
* @sessionIndex {string} The sessionIndex of the session participant
* @nameId {string} The nameId of the session participant
* @cb {function} The callback that will be called with '(err, removedElement)'
*/
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No functionality change here but it seems that there was some copy-pasting from the get method above and some of the method arguments and comments did not make sense with how the function was being used.

@ghost ghost marked this pull request as ready for review February 12, 2021 00:37
Comment thread lib/sessionParticipants/index.js Outdated
Comment thread lib/sessionParticipants/index.js
Comment thread lib/logout.js
@ghost ghost merged commit ef9a056 into master Feb 23, 2021
@ghost ghost deleted the logout-req-multiple-session-indices branch February 23, 2021 19:53
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants