add redirect
This commit is contained in:
parent
5234a1854c
commit
c5097451ef
1 changed files with 13 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
# doc: https://github.com/france-connect/Documentation-AgentConnect
|
# doc: https://github.com/france-connect/Documentation-AgentConnect
|
||||||
class AgentConnect::AgentController < ApplicationController
|
class AgentConnect::AgentController < ApplicationController
|
||||||
|
before_action :redirect_to_login_if_fc_aborted, only: [:callback]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -37,4 +39,15 @@ class AgentConnect::AgentController < ApplicationController
|
||||||
def santized_email(user_info)
|
def santized_email(user_info)
|
||||||
user_info['email'].strip.downcase
|
user_info['email'].strip.downcase
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def redirect_to_login_if_fc_aborted
|
||||||
|
if params[:code].blank?
|
||||||
|
redirect_to new_user_session_path
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def redirect_france_connect_error_connection
|
||||||
|
flash.alert = t('errors.messages.france_connect.connexion')
|
||||||
|
redirect_to(new_user_session_path)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue