This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/controllers/api/v1/api_controller.rb | |
# Base API controller class | |
class Api::V1::ApiController < ApplicationController | |
before_action :http_authorization_header?, :authenticate_request, :set_current_user | |
protected | |
# Bad Request if http authorization header missing | |
def http_authorization_header? | |
fail BadRequestError, 'errors.missing_auth_header' unless authorization_header |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/omniauth/facebook.rb | |
require 'httparty' | |
module Omniauth | |
class Facebook | |
include HTTParty | |
# The base uri for facebook graph API | |
base_uri 'https://graph.facebook.com/v2.3' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[scroll]>[shutdn] | |
[kp=]>[kp=mac] | |
* Switch up and down | |
[up]>[down] | |
[down]>[up] | |
[kp-up]>[kp-down] | |
[kp-down]>[kp-up] | |
* CMD keys |