Module Padrino::Warden::Helpers
In: lib/padrino/warden/helpers.rb

Methods

Public Class methods

Register the helpers directly without the controller (useful for MultiApp environments)

Public Instance methods

Authenticate a user against defined strategies

Check the current session is authenticated to a given scope

current_user(scope=nil)

Alias for user

current_user=(new_user, opts={})

Alias for user=

logged_in?(scope=nil)

Alias for authenticated?

login(*args)

Alias for authenticate

Terminate the current session

@param [Symbol] the session scope to terminate

Return session info

@param [Symbol] the scope to retrieve session info for

Access the user from the current session

@param [Symbol] the scope for the logged in user

Store the logged in user in the session

@param [Object] the user you want to store in the session @option opts [Symbol] :scope The scope to assign the user @example Set John as the current user

  user = User.find_by_name('John')

The main accessor to the warden middleware

[Validate]