jm81auth 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jm81auth/oauth/google.rb +17 -0
- data/lib/jm81auth/version.rb +1 -1
- data/lib/jm81auth.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5be975f805f23aee8547187c269bf7f6bd5a36cf
|
4
|
+
data.tar.gz: 4b6eadb3981c392207c1a6ad98e3049b55874586
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83eb1c01a3aa7bd494212c8cabb293c84f05137055da739d1cd74ee63e893a2be2afb3a5b2bf03040bcf3e2ede707255c03ad7eaeb6bffeada9ce9ff35b17bf1
|
7
|
+
data.tar.gz: 87d29b77340727b2be625384a38497db6bcc5912be328587ed68fbfc5ff29ee15048d1e7f73b7b34e9de1d66bba4db79395f65698885f55e1b0bcb2f5759bcb1
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Jm81auth
|
2
|
+
module OAuth
|
3
|
+
class Google < Base
|
4
|
+
ACCESS_TOKEN_URL = 'https://oauth2.googleapis.com/token'
|
5
|
+
DATA_URL = 'https://www.googleapis.com/oauth2/v3/userinfo'
|
6
|
+
|
7
|
+
def get_access_token
|
8
|
+
response = client.post(
|
9
|
+
ACCESS_TOKEN_URL, @params.merge(grant_type: 'authorization_code')
|
10
|
+
)
|
11
|
+
|
12
|
+
JSON.parse(response.body)['access_token']
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
data/lib/jm81auth/version.rb
CHANGED
data/lib/jm81auth.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jm81auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jared Morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|
@@ -126,6 +126,7 @@ files:
|
|
126
126
|
- lib/jm81auth/oauth/base.rb
|
127
127
|
- lib/jm81auth/oauth/facebook.rb
|
128
128
|
- lib/jm81auth/oauth/github.rb
|
129
|
+
- lib/jm81auth/oauth/google.rb
|
129
130
|
- lib/jm81auth/version.rb
|
130
131
|
- spec/factories/auth_methods.rb
|
131
132
|
- spec/factories/auth_tokens.rb
|