omniauth-googleplus 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjMzNzlmZDM4ZWVkNmNlMTcyNWYxZTY2NzliMjVjZDJlOTI2ODczMg==
4
+ MmE0YzUyNDlkMTM0NjUzZTYzYWFjZDM1ODA4NmExZTg5ZGEwNzQ3NA==
5
5
  data.tar.gz: !binary |-
6
- ZTc0OTY0MzliMjgwZDk0OWI2NDcwYmVlMWFkZDg0MjFiNjk5OGYyYw==
6
+ MTdjOTg3Yzk1MGE5ZGE1OWQ4OWNhNzQ4YjZiMTI5NjRiZDYyNTZkOA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MmExNDFkYzIxMzEzMzZkYWMyYTJmYmQ2Mjk1MGE0NDk0ZGY1YzMzNzBkNDE3
10
- M2E2MTkyZDAxYTczNjMwMmI2OWMwYzYyZTdmZjM4YmI3YTMyZjc5OGMxZDcy
11
- ZjYyNjg1MmEwMGU2ZmM0Njc2NTQzNjU1ZjNiODQ3MDhiN2ViN2Q=
9
+ Yjg5OTk1OWYwOGM2MzZiOWY0ODQ0MzQ3ZTAzYWQ0NWFhM2ZkMDVhODNjMjAw
10
+ OTQ3MjYwODMwYmQ5Y2ZhZWY1OGY0Y2VmNjI3MDY3Yzg2ZWEzNTg0ODQ3NmI5
11
+ NzhhZjYxNjI3M2M5MDQzZWVlMzFiYTUzOWExMjU1MTY3YjAzMDU=
12
12
  data.tar.gz: !binary |-
13
- ZDk2MmIzZGEwYmE1M2ViZTBkN2FkMGZmZDk5ZjZiNjk3NGQ1YmY3NWQxMTU3
14
- YWM5YjA2OGE2Y2ZiY2NiMjRiMDlmMDcyZTc2NmI0OWMzMmJhNTYwZjExMTU2
15
- MzA4ODJjZGIwYzUxY2MzNTFiNWQzNWVjOGJmNjFiMWE1ZjNkNjc=
13
+ Njg2MTA5NzM2MDQwNWQwNWE2MDlkMWJjM2Y4ZjI4ZTE4YzEwZmU4MzE1ZjVk
14
+ NzFlMmRiM2ZiYjIyM2RiYjkzYTRhYzJmYjRlOGU3ZThhMTg4OThkODY3NWM0
15
+ YzEzM2VhZDAzNzc0YzY2ZmJiYjBkZWRiYjVhZWU1YzQ5ODE1Njk=
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
- module GooglePlus
3
- VERSION = "0.0.1"
2
+ module Googleplus
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -2,27 +2,25 @@ require 'omniauth/strategies/oauth2'
2
2
  require 'base64'
3
3
  require 'openssl'
4
4
  require 'rack/utils'
5
+ require 'net/https'
5
6
 
6
7
  module OmniAuth
7
8
  module Strategies
8
- class GooglePlus < OmniAuth::Strategies::OAuth2
9
+ class Googleplus < OmniAuth::Strategies::OAuth2
9
10
  class NoAuthorizationCodeError < StandardError; end
10
11
 
12
+ # Scopes: plus.login plus.me userinfo.email
13
+ # from https://developers.google.com/+/api/oauth
14
+ DEFAULT_SCOPE = "plus.login"
15
+
11
16
  option :name, 'googleplus'
12
17
  option :authorize_options, [:scope, :approval_prompt, :access_type, :state, :hd]
13
-
18
+
14
19
  option :client_options, {
15
20
  :site => 'https://accounts.google.com',
16
21
  :authorize_url => '/o/oauth2/auth',
17
22
  :token_url => '/o/oauth2/token'
18
23
  }
19
-
20
- #https://accounts.google.com/o/oauth2/auth?
21
- #scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&
22
- #state=%2Fprofile&
23
- #redirect_uri=https%3A%2F%2Foauth2-login-demo.appspot.com%2Foauthcallback&
24
- #response_type=token&
25
- #client_id=812741506391.apps.googleusercontent.com
26
24
 
27
25
  def authorize_params
28
26
  base_scope_url = "https://www.googleapis.com/auth/"
@@ -4,7 +4,7 @@ require "omniauth-googleplus/version"
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = "omniauth-googleplus"
7
- s.version = Omniauth::GooglePlus::VERSION
7
+ s.version = Omniauth::Googleplus::VERSION
8
8
  s.authors = ["Niko Roberts"]
9
9
  s.email = ["niko@tasboa.com"]
10
10
  s.homepage = "https://github.com/tasboa/omniauth-googleplus"
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe OmniAuth::Strategies::GooglePlus do
3
+ describe OmniAuth::Strategies::Googleplus do
4
4
  it 'should do some testing' do
5
5
  pending
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-googleplus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Niko Roberts