Class: SamlIdp::IdpController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- SamlIdp::IdpController
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
#create ⇒ Object
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
|
#logout ⇒ Object
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
|
#new ⇒ Object
10
11
12
|
# File 'app/controllers/saml_idp/idp_controller.rb', line 10
def new
render template: "saml_idp/idp/new"
end
|
#show ⇒ Object
14
15
16
|
# File 'app/controllers/saml_idp/idp_controller.rb', line 14
def show
render xml: SamlIdp.metadata.signed
end
|