Class: SamlIdp::IdpController

Inherits:
ActionController::Base
  • Object
show all
Includes:
Controller
Defined in:
app/controllers/saml_idp/idp_controller.rb

Instance Attribute Summary

Attributes included from Controller

#algorithm, #saml_request

Instance Method Summary collapse

Instance Method Details

#createObject



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'app/controllers/saml_idp/idp_controller.rb', line 18

def create
  unless params[:email].blank? && params[:password].blank?
    person = idp_authenticate(params[:email], params[:password])
    if person.nil?
      @saml_idp_fail_msg = "Incorrect email or password."
    else
      @saml_response = idp_make_saml_response(person)
      render :template => "saml_idp/idp/saml_post", :layout => false
      return
    end
  end
  render :template => "saml_idp/idp/new"
end

#logoutObject



32
33
34
35
36
# File 'app/controllers/saml_idp/idp_controller.rb', line 32

def logout
  idp_logout
  @saml_response = idp_make_saml_response(nil)
  render :template => "saml_idp/idp/saml_post", :layout => false
end

#newObject



10
11
12
# File 'app/controllers/saml_idp/idp_controller.rb', line 10

def new
  render template: "saml_idp/idp/new"
end

#showObject



14
15
16
# File 'app/controllers/saml_idp/idp_controller.rb', line 14

def show
  render xml: SamlIdp..signed
end