Noah-Huppert / NoahHuppert.com

Personal website.
https://noahh.io
0 stars 0 forks source link

Make helpers for checking user permissions #24

Closed Noah-Huppert closed 9 years ago

Noah-Huppert commented 9 years ago

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 null user_id and a null expires_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

Noah-Huppert commented 9 years ago

Done!