-
-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
logoutRequestRedirectURL now replaces required and custom tags #202
Conversation
IssueInstant: new Date().toISOString(), | ||
NameIDFormat: namespace.format[initSetting.logoutNameIDFormat] || namespace.format.emailAddress, | ||
NameID: user.logoutNameID, | ||
SessionIndex: user.sessionIndex, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SessionIndex
is not a required field, but it was already being added. Leaving this in here to prevent potential issues with others
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SessionIndex
is not being added into the default template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tngan you are correct. It's not being used, but looking at line 145 of the original code, it was added in there. I could remove this line, but I left it in to avoid unintended side affects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. Okay, let's keep it first. I am working on a big revamp as well.
@@ -214,12 +214,12 @@ test('create post login response', async t => { | |||
}); | |||
|
|||
test('create logout request with redirect binding', t => { | |||
const { id, context } = sp.createLogoutRequest(idp, 'redirect', { email: 'user@esaml2' }); | |||
const { id, context } = sp.createLogoutRequest(idp, 'redirect', { logoutNameID: 'user@esaml2' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NameID
looks for user.logoutNameID
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch !
Updating logic of
customReplaceTag
to accept tags created by the entity.callback function for
createLogoutRequest
would look like thiscustomReplaceTagsByValue
being a function that returns { context, id } and can be very similar tolibsaml.replaceTagsByValue
PR associated with #196