omniauth-googleplus 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MmE0YzUyNDlkMTM0NjUzZTYzYWFjZDM1ODA4NmExZTg5ZGEwNzQ3NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTdjOTg3Yzk1MGE5ZGE1OWQ4OWNhNzQ4YjZiMTI5NjRiZDYyNTZkOA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Yjg5OTk1OWYwOGM2MzZiOWY0ODQ0MzQ3ZTAzYWQ0NWFhM2ZkMDVhODNjMjAw
|
10
|
+
OTQ3MjYwODMwYmQ5Y2ZhZWY1OGY0Y2VmNjI3MDY3Yzg2ZWEzNTg0ODQ3NmI5
|
11
|
+
NzhhZjYxNjI3M2M5MDQzZWVlMzFiYTUzOWExMjU1MTY3YjAzMDU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
Njg2MTA5NzM2MDQwNWQwNWE2MDlkMWJjM2Y4ZjI4ZTE4YzEwZmU4MzE1ZjVk
|
14
|
+
NzFlMmRiM2ZiYjIyM2RiYjkzYTRhYzJmYjRlOGU3ZThhMTg4OThkODY3NWM0
|
15
|
+
YzEzM2VhZDAzNzc0YzY2ZmJiYjBkZWRiYjVhZWU1YzQ5ODE1Njk=
|
@@ -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
|
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/"
|
data/omniauth-googleplus.gemspec
CHANGED
@@ -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::
|
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"
|