Make a suite of helper methods for checking to see if the client making the api request has the correct permissions.
Models::ApiAccessToken.from_request(request): Creates an ApiAccessToken from a Http request. If an access_token is not present one will be created with a nulluser_id and a nullexpires_on
Models::User.from_access_token(access_token): Creates a User from an ApiAccessToken. If the user_id feild in the ApiAccessToken is null then a user will be created as per #23
Make a suite of helper methods for checking to see if the client making the api request has the correct permissions.
Models::ApiAccessToken.from_request(request)
: Creates anApiAccessToken
from a Http request. If anaccess_token
is not present one will be created with anull
user_id
and anull
expires_on
Models::User.from_access_token(access_token)
: Creates aUser
from anApiAccessToken
. If theuser_id
feild in theApiAccessToken
is null then a user will be created as per #23