Sha256: 9f1f829ece342bd5adfa055da4ac5f18c409a0ce3e1e98495269683cb03c8bc3
Contents?: true
Size: 922 Bytes
Versions: 7
Compression:
Stored size: 922 Bytes
Contents
module Authpds module Controllers module AuthpdsSessionsController # GET /user_sessions/new # GET /login def new @user_session = UserSession.new(params) redirect_to @user_session.login_url(params) unless @user_session.login_url.nil? raise RuntimeError.new( "Error in #{self.class}.\nNo login url defined") if @user_session.login_url.nil? end # GET /validate def validate @user_session = UserSession.create(params[:user_session]) redirect_to (params[:return_url].nil?) ? root_url : params[:return_url] end # DELETE /user_sessions/1 # GET /logout def destroy user_session = UserSession.find logout_url = user_session.logout_url(params) unless user_session.nil? user_session.destroy unless user_session.nil? redirect_to user_session_redirect_url(logout_url) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems