-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
else | ||
flash[:alert] = t('omniauth.logout_fail') | ||
render :failure | ||
end |
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.
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
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.
To clarify, what's not tested is the failure part of this method.
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.
thanks, failure tests added.
ff23e32
to
e3e3686
Compare
@monfresh thanks for the review. I've added tests for the failure flows. |
a93df4b
to
c6d3285
Compare
@@ -0,0 +1,5 @@ | |||
class UuiDtoString < ActiveRecord::Migration | |||
def change | |||
change_column :users, :uuid, :string, null: false |
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.
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.
tests here will fail until saml-idp/saml_idp#50 is merged. |
79d82f2
to
27bf2ad
Compare
saml-idp/saml_idp#50 appears to have been abandoned. I have switched this PR to point at the 18F fork. |
27bf2ad
to
a425316
Compare
@amoose now that 18F/saml_idp#3 is merged I have updated this PR to point at master. |
a425316
to
0c11fda
Compare
**Why**: Better UX, since we end up on dashboard site, where user clicked the Sign Out button.
0c11fda
to
700eaab
Compare
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 |
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.
The only gap I see is IdP-initiated logout. (we can improve coverage later)
Why:
Better UX, since we end up on dashboard site, where user
clicked the Sign Out button.