Sha256: ca8f261ae27764dab6776b2cbd8a1367913a0c7ef6bc27b3a130e28009f16f15

Contents?: true

Size: 370 Bytes

Versions: 1

Compression:

Stored size: 370 Bytes

Contents

# http://github.com/account/applications
class GithubToken < OauthToken
  
  version 2.0
  
  key do |access_token|
    response = JSON.parse(access_token.get("/api/v2/json/user/show"))
    response["user"]["id"]
  end
  
  settings "https://github.com",
    :authorize_path     => "/login/oauth/authorize",
    :access_token_path  => "/login/oauth/access_token"
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
passport-0.1.1 lib/passport/oauth/tokens/github_token.rb