Commit 679c9270 authored by o's avatar o
Browse files

remove saml_metadata, add dedicated url for saml post logins

parent 94edd100
......@@ -84,10 +84,6 @@ module ApiBackend
nil
end
def self.saml_metadata
get(['auth', 'saml_metadata'],{})['metadata']
end
def self.pre_auth(email)
if EmailValidation::immerda_email_conform(email)
get(['auth', 'pre_auth'], {'email' => email})
......
......@@ -5,9 +5,4 @@ class MainController < ApplicationController
end
@logged_in = where_am_i_logged_in
end
def saml_metadata
@saml_metadata ||= ApiBackend::saml_metadata()
render xml: @saml_metadata
end
end
class SamlLoginController < LoginController
skip_before_action :verify_authenticity_token, only: [:new]
protected
def successful_login(options, unused)
@saml_response = options['saml_response']
......@@ -56,13 +58,6 @@ class SamlLoginController < LoginController
super
end
def login
unless params[:user_id].present?
return new
end
super
end
def auth(user, pw, unlock, totp)
ApiBackend::auth_saml(
user,
......
Rails.application.routes.draw do
root to: 'main#show'
get '/saml_metadata', to: 'main#saml_metadata'
get '/login/saml', to: 'saml_login#new'
post '/login/saml_post', to: 'saml_login#new'
post '/login/saml', to: 'saml_login#login'
get '/login/:handoff', to: 'handoff_login#new'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment