module Maestrano::Rails::MaestranoSecurity::ControllerFilters
Public Instance Methods
session_preset()
click to toggle source
# File lib/maestrano/rails/controllers/maestrano_security.rb, line 30 def session_preset @session_preset ||= begin mno_session = (self.session[:maestrano] || self.session['maestrano']) if mno_session decrypted_session = JSON.parse(Base64.decode64(mno_session)) decrypted_session['preset'] else nil end end end
verify_maestrano_session()
click to toggle source
If a maestrano session is present then we check its validity. If not valid anymore the filter triggers a Maestrano
SSO handshake
# File lib/maestrano/rails/controllers/maestrano_security.rb, line 19 def verify_maestrano_session if Maestrano[session_preset].param(:sso_enabled) unless controller_name == 'saml' && ['init','consume'].include?(action_name) if !Maestrano::SSO::Session[session_preset].new(session).valid?(if_session:true) redirect_to Maestrano::SSO[session_preset].init_url end end end true end