Skip to content
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

SP-initiated logout #23

Merged
merged 1 commit into from
Jan 4, 2017
Merged

SP-initiated logout #23

merged 1 commit into from
Jan 4, 2017

Conversation

pkarman
Copy link
Contributor

@pkarman pkarman commented Jul 13, 2016

Why:

Better UX, since we end up on dashboard site, where user
clicked the Sign Out button.

else
flash[:alert] = t('omniauth.logout_fail')
render :failure
end
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this is not tested. By the way, I can tell because I'm using Code Climate's awesome browser extension, which you have to sign up to get, but I got access pretty quickly. https://codeclimate.com/browser-extension

Copy link
Contributor

Choose a reason for hiding this comment

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

To clarify, what's not tested is the failure part of this method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, failure tests added.

@pkarman pkarman mentioned this pull request Jul 15, 2016
@pkarman pkarman force-pushed the sp-initiated-slo branch 2 times, most recently from ff23e32 to e3e3686 Compare July 15, 2016 15:09
@pkarman
Copy link
Contributor Author

pkarman commented Jul 15, 2016

@monfresh thanks for the review. I've added tests for the failure flows.

@pkarman pkarman force-pushed the sp-initiated-slo branch 3 times, most recently from a93df4b to c6d3285 Compare July 18, 2016 19:40
@@ -0,0 +1,5 @@
class UuiDtoString < ActiveRecord::Migration
def change
change_column :users, :uuid, :string, null: false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

since the -idp seed users have UUID strings that are not actually valid UUIDs (not strictly base64-encoded), use a more generic string definition. As long as it is a MBUN we don't really care.

@pkarman
Copy link
Contributor Author

pkarman commented Jul 18, 2016

tests here will fail until saml-idp/saml_idp#50 is merged.

@pkarman pkarman force-pushed the sp-initiated-slo branch 2 times, most recently from 79d82f2 to 27bf2ad Compare November 3, 2016 15:53
@pkarman
Copy link
Contributor Author

pkarman commented Nov 3, 2016

saml-idp/saml_idp#50 appears to have been abandoned. I have switched this PR to point at the 18F fork.

@pkarman
Copy link
Contributor Author

pkarman commented Dec 7, 2016

@amoose now that 18F/saml_idp#3 is merged I have updated this PR to point at master.

**Why**: Better UX, since we end up on dashboard site, where user
clicked the Sign Out button.
@amoose
Copy link
Contributor

amoose commented Jan 4, 2017

LGTM 👍

# expect we are logged out, on our site
expect(response).to redirect_to(root_url)
expect(flash[:notice]).to eq I18n.t('omniauth.logout_ok')
end
Copy link
Contributor

@amoose amoose Jan 4, 2017

Choose a reason for hiding this comment

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

The only gap I see is IdP-initiated logout. (we can improve coverage later)

@pkarman pkarman merged commit 605d483 into master Jan 4, 2017
@pkarman pkarman deleted the sp-initiated-slo branch January 4, 2017 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants