lib/authlane/helper.rb
##
# Marks a route as the logout route.
#
# It resets the current Session and deletes any Session data along with it, particularly
# the *AuthLane* Session data. The *Forget Strategy* will be called here as well to
# 'counteract' the *Remember Me* functionality that is implemented in the *Remember* and
# *Auth Strategy*.
#
# @example
#   get '/signout' do
#     unauthorize!
#   end
#
# @return [void]
#
# @see Sinatra::AuthLane.create_forget_strategy create_forget_strategy
#
Marks a route as the logout route.
It resets the current Session and deletes any Session data along with it, particularly
the *AuthLane* Session data.
Marks a route as the logout route . It resets the current Session and deletes any Session data along with it particularly the * AuthLane * Session data .
def unauthorize!
        token = cookies[settings.authlane[:remember_cookie]]
        self.instance_exec(token, &settings.authlane[:forget_strategy]) unless token.nil?
        cookies.delete(settings.authlane[:remember_cookie])
        session.destroy
      end
def unauthorize! token = cookies [ settings . authlane [ :remember_cookie ] ] self . instance_exec ( token , & settings . authlane [ :forget_strategy ] ) unless token . nil? cookies . delete ( settings . authlane [ :remember_cookie ] ) session . destroy end
Marks a route as the logout route.
Marks a route as the logout route .
# @private
None
void
example
get '/signout' do unauthorize. end
get ' / signout ' do unauthorize . end
see
None