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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f2873d50e1638fdb74d85b184b8ad2c8de7e313
4
- data.tar.gz: e2ea6c097c9c17d009db9dd395efdae7908abd90
3
+ metadata.gz: 5be975f805f23aee8547187c269bf7f6bd5a36cf
4
+ data.tar.gz: 4b6eadb3981c392207c1a6ad98e3049b55874586
5
5
  SHA512:
6
- metadata.gz: d39f490120b1bb4cf67bef639c3e3fe2d1fb1e73e858522513b52b563df5e5741392b300d277cc57aa4a7d97a081b14f3a0ca165fe01cffe7eb4aef2be09c396
7
- data.tar.gz: '09ebd943d1bc77b9c5f5504eb32bff049431bc4bc709c9fa18f3bfe2a6f719fb63cc860574b2432249e9d8e401b0ce764456d0cf11b96c419a75dcbb207b4889'
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
+
@@ -1,3 +1,3 @@
1
1
  module Jm81auth
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
data/lib/jm81auth.rb CHANGED
@@ -20,5 +20,6 @@ require 'jm81auth/models/user'
20
20
  require 'jm81auth/oauth/base'
21
21
  require 'jm81auth/oauth/facebook'
22
22
  require 'jm81auth/oauth/github'
23
+ require 'jm81auth/oauth/google'
23
24
 
24
25
  require 'jm81auth/version'
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.2
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-23 00:00:00.000000000 Z
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