lib/authn/session.rb in authn-3.5.0 vs lib/authn/session.rb in authn-3.7.2

- old
+ new

@@ -1,7 +1,8 @@ module AuthN module Session + private def login(identifiers, klass = AuthN.config.account_klass) generate_session_and_instance_from find_instance_klass(klass).authenticate identifiers end def auto_login(instance) @@ -24,10 +25,12 @@ @current_user ||= get_session klass_as_name find_instance_klass klass end alias_method :current_account, :current_user - private + def require_login + unauthenticated unless logged_in? + end def find_instance_klass(klass) Object.const_get klass.capitalize end