stbaldricks 4.4.0.beta.1 → 4.4.0.beta.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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f02b9391aa6707f27a383585bad6d5a80596f938caf9943f8b75d9597700004
4
- data.tar.gz: b88e6ba18647f147f915bf5e71af8e79b1f356804ae6bfcb49b833382dec22aa
3
+ metadata.gz: 98e4df5d803ed719c1f86f1ab19f50f6f02f8f0012cb2e4163e001997b19944a
4
+ data.tar.gz: 354d7b88af1cdc39ce1cc60d7d0d9add811e9bbba83b226ba306f28cf656defe
5
5
  SHA512:
6
- metadata.gz: 54d50fc596b7ef1b7a4ba0dbaf40689a04b5a37401b583941bcbc3c0de685a0350de71127a837d21b0ba8915091a866a769521a4c4b914262af77040d478fab4
7
- data.tar.gz: 98ec20f28fe97e545de8f30928e7000d20008c11d93d2b8210877f732d704993ed69da77c3cd22eb62eb180ebaaf638746421205624ab9cb4b8ad4478651a4b9
6
+ metadata.gz: f519962bee5e3aff8b96626846385d74ccd2ac611f9cb87b2d75cbfdbcab2c4d00d0c75f66a05d3a20ad60a96b6700db7fd1b49a46ad45ee6e2630fd85f33093
7
+ data.tar.gz: cc2d12cee5823456f503abdbff2d0f733173fc785587c87ca4582be656bb73b43bea548005b0cfa999d421912fcf48ee0ba8a41f58c2245020f68dac57c40126
@@ -4,30 +4,33 @@ module SBF
4
4
  module Client
5
5
  module Facebook
6
6
  class UserEndpoint < SBF::Client::UserEndpoint
7
- # Logs in a user, using their Facebook identifier & token, and configures the client library to use user credentials for subsequent requests.
7
+ # Logs in a user, using a Facebook Oauth authorization code & redirect uri.
8
+ # Configures the client library to use user credentials for subsequent requests.
8
9
  # Returns the SBF access token for the user that should be held onto to configure the client library in
9
10
  # future requests that are outside of this scope.
10
11
  #
11
- # @param identifier [string]
12
- # @param token [string]
12
+ # @param authorization_code [string]
13
+ # @param redirect_uri [string]
13
14
  # @return [string]
14
- def login!(identifier, token)
15
+ def login!(authorization_code, redirect_uri)
15
16
  response = SBF::Client::Api::Request.post_request(
16
17
  "/#{SBF::Client::Api::VERSION}/security/facebook/login",
17
- identifier: identifier,
18
- token: token
18
+ authorization_code: authorization_code,
19
+ redirect_uri: redirect_uri
19
20
  )
20
21
  parsed_response = JSON.parse(response.body).symbolize!
21
22
 
22
23
  if ok?(response)
23
24
  SBF::Client::Configuration.user_token = parsed_response[:token]
24
25
  data = parsed_response.merge(user: target_class.new(parsed_response[:user]))
26
+ SBF::Client::LOG.info {
27
+ "SBF::Client - Facebook User Login with Identifier: #{parsed_response[:user][:identifier]}, SBF Token: #{parsed_response[:token]}"
28
+ }
25
29
  else
26
30
  SBF::Client::Configuration.user_token = nil
27
31
  error = SBF::Client::ErrorEntity.new(parsed_response)
28
32
  end
29
33
 
30
- SBF::Client::LOG.info { "SBF::Client - Facebook User Login with Identifier: #{identifier}, SBF Token: #{parsed_response[:token]}" }
31
34
  SBF::Client::Api::Response.new(http_code: response.code, data: data, error: error)
32
35
  end
33
36
  end
@@ -1,5 +1,5 @@
1
1
  module SBF
2
2
  module Client
3
- VERSION = '4.4.0.beta.1'
3
+ VERSION = '4.4.0.beta.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stbaldricks
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.0.beta.1
4
+ version: 4.4.0.beta.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Firespring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-30 00:00:00.000000000 Z
11
+ date: 2018-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel