You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: saml_idp_controller.rb
    path of file: ./repos/saml_idp/spec/rails_app/app/controllers
    
    the code of the file until where you have to start completion: class SamlIdpController < ApplicationController
  include SamlIdp::Controller

  if Rails::VERSION::MAJOR >= 4
    before_action :add_view_path, only: [:new, :create, :logout]
    before_action :validate_saml_request, only: [:new, :c
    
  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