authable v0.5.1 Authable.Authentications.Bearer

Bearer authencation helper module

Summary

Functions

Authenticates resource-owner using access_token token value

Functions

authenticate(access_token)

Authenticates resource-owner using access_token token value.

It matches resource owner with given access_token. If any resource owner matched given credentials, it returns resource owner struct, otherwise nil.

Examples

# Suppose we have a access_token at 'token store(Authable.Token)'
# with token value "at123456789"
# If we pass the token value to the function,
# it will return resource-owner.
Authable.Authentications.Bearer.authenticate("at123456789")