Skip to content

Commit

Permalink
refactor: adding methods in saml_sessions_controller.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
Asrani-Aman authored Jul 30, 2024
1 parent 63966d4 commit ff2a630
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion app/controllers/users/saml_sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,23 @@

class Users::SamlSessionsController < Devise::SamlSessionsController
after_action :store_winning_strategy, only: :create

def new
super
end

def metadata
super
end

def create
super
end


private


# for Supporting multiple authentication strategies
def store_winning_strategy
warden.session(:user)[:strategy] = warden.winning_strategies[:user].class.name.demodulize.underscore.to_sym
end
Expand Down

0 comments on commit ff2a630

Please sign in to comment.