-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10776 from demarches-simplifiees/ac_2fa
ETQ Instructeur, je dois utiliser le 2fa pour le fournisseur d'identité Agent Connect / Mon Compte Pro
- Loading branch information
Showing
14 changed files
with
204 additions
and
14 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 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 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 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,14 @@ | ||
.fr-container | ||
%h1.fr-h2.fr-mt-4w Une validation en 2 étapes est désormais nécessaire. | ||
|
||
%p.fr-mb-2w | ||
La sécurité de votre compte augmente. Nous vous demandons à présent une validation en 2 étapes pour vous connecter. | ||
|
||
%p.fr-mb-2w | ||
Vous allez devoir <b>configurer votre mode d'authentification</b> sur le site <b>MonComptePro</b> : | ||
|
||
%img{ src: image_url("instructions_moncomptepro.png"), alt: "MonComptePro", loading: 'lazy' } | ||
|
||
|
||
%button.fr-btn.fr-btn--primary.fr-mb-2w | ||
= link_to "Configurer mon appli d'authentification sur MonComptePro", ENV['MON_COMPTE_PRO_2FA_NOT_CONFIGURED_URL'] |
12 changes: 12 additions & 0 deletions
12
app/views/agent_connect/agent/relogin_after_2fa_config.html.haml
This file contains 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 @@ | ||
.fr-container | ||
%h1.fr-h2.fr-mt-4w Poursuivez votre connexion à #{APPLICATION_NAME} | ||
|
||
= render Dsfr::AlertComponent.new(state: :success, extra_class_names: 'fr-mb-4w') do |c| | ||
- c.with_body do | ||
%p Votre application d'authentification a bien été configurée. | ||
|
||
%p.fr-mb-4w | ||
Vous allez maintenant pouvoir <b>vous connecter</b> à nouveau à #{APPLICATION_NAME} en effectuant la validation en 2 étapes avec votre <b>application d'authentification</b>. | ||
|
||
%button.fr-btn.fr-btn--primary.fr-mb-2w | ||
= link_to "Se connecter à #{APPLICATION_NAME} avec #{AgentConnect}", agent_connect_login_path |
This file contains 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 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 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
7 changes: 7 additions & 0 deletions
7
db/migrate/20240916114050_add_amr_column_to_agent_connect_informations_table.rb
This file contains 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,7 @@ | ||
# frozen_string_literal: true | ||
|
||
class AddAmrColumnToAgentConnectInformationsTable < ActiveRecord::Migration[7.0] | ||
def change | ||
add_column :agent_connect_informations, :amr, :string, array: true, default: [] | ||
end | ||
end |
This file contains 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 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 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 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,19 @@ | ||
# frozen_string_literal: true | ||
|
||
describe AgentConnectService do | ||
describe '.logout_url' do | ||
let(:id_token) { 'id_token' } | ||
|
||
before do | ||
::AGENT_CONNECT ||= {} | ||
allow(AGENT_CONNECT).to receive(:[]) | ||
.with(:end_session_endpoint).and_return("https://agent-connect.fr/logout") | ||
end | ||
|
||
subject { described_class.logout_url(id_token, host_with_port: 'test.host') } | ||
|
||
it 'returns the correct url' do | ||
expect(subject).to eq("https://agent-connect.fr/logout?id_token_hint=id_token&post_logout_redirect_uri=http%3A%2F%2Ftest.host%2Flogout") | ||
end | ||
end | ||
end |