GenieAuthentication.GenieAuthentication - Module

Functionality for authenticating Genie users.

source



GenieAuthentication.deauthenticate-Tuple{GenieSession.Session} - Method
deauthenticate(session)
deauthenticate(params::Dict{Symbol,Any})

Removes the user id from the session.

source


GenieAuthentication.get_authentication-Tuple{GenieSession.Session} - Method
get_authentication(session) :: Union{Nothing,Any}
get_authentication(params::Dict{Symbol,Any}) :: Union{Nothing,Any}

Returns the user id stored on the session, if available.

source


GenieAuthentication.install-Tuple{String} - Method
install(dest::String; force = false, debug = false) :: Nothing

Copies the plugin's files into the host Genie application.

source


GenieAuthentication.is_authenticated-Tuple{Union{Nothing, GenieSession.Session}} - Method
is_authenticated(session) :: Bool
is_authenticated(params::Dict{Symbol,Any}) :: Bool

Returns true if a user id is stored on the session.

source


GenieAuthentication.login-Union{Tuple{M}, Tuple{M, GenieSession.Session}} where M<:SearchLight.AbstractModel - Method
login(user, session)
login(user, params::Dict{Symbol,Any})

Persists on session the id of the user object and returns the session.

source


GenieAuthentication.logout-Tuple{GenieSession.Session} - Method
logout(session) :: Sessions.Session
logout(params::Dict{Symbol,Any}) :: Sessions.Session

Deletes the id of the user object from the session, effectively logging the user off.

source


GenieAuthentication.with_authentication-Tuple{Function, Function, Union{Nothing, GenieSession.Session}} - Method
with_authentication(f::Function, fallback::Function, session)
with_authentication(f::Function, fallback::Function, params::Dict{Symbol,Any})

Invokes f only if a user is currently authenticated on the session, fallback is invoked otherwise.

source


GenieAuthentication.without_authentication-Tuple{Function, GenieSession.Session} - Method
without_authentication(f::Function, session)
without_authentication(f::Function, params::Dict{Symbol,Any})

Invokes f if there is no user authenticated on the current session.

source


GenieAuthentication.@authenticated! - Macro
@authenticate!(exception::E = ExceptionalResponse(Genie.Renderer.redirect(:show_login)))

If the current request is not authenticated it throws an ExceptionalResponse exception.

source



Genie