-
Notifications
You must be signed in to change notification settings - Fork 18
DPC-5127 update portal to use multiple OIDC #2883
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
Open
jdettmannnava
wants to merge
76
commits into
main
Choose a base branch
from
jd/dpc-5127-multiple-oidc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
76 commits
Select commit
Hold shift + click to select a range
49c7e79
sort of working
jdettmannnava b38beaa
working except in tests
jdettmannnava 653e4fb
Merge branch 'main' into jd/undevise
jdettmannnava a48e722
working without devise
jdettmannnava cc1342f
better for eval
jdettmannnava f32edc0
cleanup
jdettmannnava 892b051
cleanup
jdettmannnava 0099dc4
test invitation flow
jdettmannnava 359f685
Merge branch 'main' into jd/undevise
jdettmannnava e452d81
Merge branch 'main' into jd/undevise
jdettmannnava 08c230c
Merge branch 'main' into jd/undevise
jdettmannnava 9629895
Merge branch 'main' into jd/undevise
jdettmannnava 5f640e4
Merge branch 'main' into jd/undevise
jdettmannnava fb592c0
Merge branch 'main' into jd/undevise
jdettmannnava 7807302
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 1216ecf
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 2a50289
Merge branch 'jd/dpc-5127-multiple-oidc' of github.com:CMSgov/dpc-app…
jdettmannnava a02ccc5
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 386e178
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava ec7bf0e
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 8652201
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 8c705e4
fix user create, accessibility tests
jdettmannnava a5c3806
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 478f77e
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 6778849
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 08fb743
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava cb182dc
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava faf2875
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 3cdd9d0
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 8a435c8
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 9158dbd
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 6ec0ee1
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 9c5119c
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava db43ba6
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 729c0ce
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 187f0c3
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava be910bd
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 3b3f35d
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava be58ca3
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 72b19b3
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 764b99a
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava e75d6fb
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 72c6c9b
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 3a675d3
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 4f7021d
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava ec9a82f
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 8947504
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 64054d6
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 57cf436
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava d3dcbcb
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 1fb7d12
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 741a3e8
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 9420bd7
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 5d0877c
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 819dc41
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 9010481
force merge dpc-admin and dpc-web
jdettmannnava 4397aa2
merge main
jdettmannnava fa1bb09
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 1cb0d21
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava baef2c5
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 4803ec7
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 4d5e8e0
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava f858656
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 1bfeaf3
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 47b7fe5
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava a90696d
undevise javascript test
jdettmannnava c1a30f0
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava bc799a2
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 20e90ff
add login support to integration tests
jdettmannnava a44ba73
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava aa768e4
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava d93a6c2
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava dae0674
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 3c54bee
Merge branch 'main' into jd/dpc-5127-multiple-oidc
jdettmannnava 250e311
Resolving merge conflicts with main
Jose-verdance 74dd2cf
DPC-5159 multi csp user POC (#2896)
jdettmannnava File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,20 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| module Users | ||
| # Adds functionality to devise session controller | ||
| class SessionsController < Devise::SessionsController | ||
| # Handles session destruction | ||
| class SessionsController < ApplicationController | ||
| auto_session_timeout_actions | ||
|
|
||
| def destroy | ||
| Rails.logger.info(['User logged out', | ||
| { actionContext: LoggingConstants::ActionContext::Authentication, | ||
| actionType: LoggingConstants::ActionType::UserLoggedOut }]) | ||
| sign_out(current_user) | ||
| session.delete('user') | ||
| redirect_to url_for_login_dot_gov_logout, allow_other_host: true | ||
| end | ||
|
|
||
| def logged_out | ||
| redirect_to session.delete(:user_return_to) || sign_in_path | ||
| end | ||
| end | ||
| end |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| # Utility methods for views | ||
| module ApplicationHelper | ||
| def current_user | ||
| @current_user | ||
| end | ||
|
|
||
| def omniauth_authorize_path(service) | ||
| "/portal/auth/#{service}" | ||
| end | ||
| end |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| # Simple class for holding OIDC information linked to user | ||
| class IdpUid < ApplicationRecord | ||
| belongs_to :user | ||
| end |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| <p><%= @message %> <%= link_to 'Try again?', new_user_session_path %></p> | ||
| <p><%= @message %> <%= link_to 'Try again?', sign_in_path %></p> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| <p>You logged in, <%= current_user.given_name %> <%= current_user.family_name %>!</p> | ||
| <p><%= link_to 'Try again?', new_user_session_path %></p> | ||
| <p><%= link_to 'Try again?', sign_in_path %></p> |
2 changes: 1 addition & 1 deletion
2
...al/app/views/devise/sessions/new.html.erb → ...tal/app/views/users/sessions/new.html.erb
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| <%= render(Page::Session::LoginComponent.new(omniauth_authorize_path(:user, :openid_connect))) %> | ||
| <%= render(Page::Session::LoginComponent.new(omniauth_authorize_path(:login_dot_gov))) %> |
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
probably don't need to change this config setting
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.
Not necessary, but I found that it was difficult to analyze the logs because of their colorization, so I would prefer to leave this change in.