Files

Merb::Session

Public Instance Methods

abandon!() click to toggle source

Remove the user from the session and clear all data.

# File lib/merb-auth-core/session_mixin.rb, line 40
def abandon!
  authentication.abandon!
end
authenticate!(request, params, *rest) click to toggle source

Authenticates the session via the authentication object.

See Merb::Authentication#authenticate for usage

# File lib/merb-auth-core/session_mixin.rb, line 24
def authenticate!(request, params, *rest)
  authentication.authenticate!(request, params, *rest)
end
authenticated?() click to toggle source

Check to see if the current session is authenticated @return true if authenticated. false otherwise

# File lib/merb-auth-core/session_mixin.rb, line 17
def authenticated?
  authentication.authenticated?
end
authentication() click to toggle source

Access to the authentication object directly. Particularly useful for accessing the errors.

Example

<%= error_messages_for session.authentication %>
# File lib/merb-auth-core/session_mixin.rb, line 11
def authentication
  @authentication ||= Merb::Authentication.new(self)
end
user() click to toggle source

Provides access to the currently authenticated user.

# File lib/merb-auth-core/session_mixin.rb, line 29
def user
  authentication.user
end
user=(the_user) click to toggle source

set the currently authenticated user manually Merb::Authentication#store_user should know how to store the object into the session

# File lib/merb-auth-core/session_mixin.rb, line 35
def user=(the_user)
  authentication.user = the_user
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.