authable v0.6.2 Authable.Authentication.Session
Bearer authencation helper module, implements Authable.Authentication behaviour.
Summary
Functions
Authenticates resource-owner using session_token token value
Functions
Authenticates resource-owner using session_token token value.
It matches resource owner with given session_token. Since Session auth
represents resource owners direct access to resources, it does not require
any scope check for authorization.
If any resource owner matched given credentials,
it returns {:ok, Authable.Model.User struct}
, otherwise
{:error, Map, :http_status_code}
Examples
# Suppose we have a session_token at 'token store(Authable.Token)'
# with token value "st123456789"
# If we pass the token value to the function,
# it will return resource-owner.
Authable.Authentication.Session.authenticate("st123456789", [])