nexaas_id-client 0.5.0 → 0.6.0

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
  SHA256:
3
- metadata.gz: f3978e7b154621fc0f8dd536e6b04bb698d40a1832d3e7b47877b89c9b134cef
4
- data.tar.gz: e7734839350d7f934535ba6cdb0c81a50f949bab7b98e8320a31fdae077579dd
3
+ metadata.gz: c3bd50fd55bf1b80459593dc7cd5b6b95de5126c047e6a13c74019528704f981
4
+ data.tar.gz: ff3c81132f73b8ea52d488b55cc9a1a48ecb56d4d9e2a194d743ca402d28f67d
5
5
  SHA512:
6
- metadata.gz: eb039caf2751267b96656cb352c733dde80a26e13a01334e0b2c750d66aaf70213dd4cffcd98c700449ebf88c6d2c8b12acefa0f64a5d9985b5537e81ae13675
7
- data.tar.gz: c79c89c10b71fbba286ac99ddce047f553e9e43ca595a27df4b3b8e63b75d0f44b60261a0751d66e15e205658d19b0d0f93eecb33dcbe82d16fbe0c9d326a404
6
+ metadata.gz: dffb7b70907354211a1b6a647203a1b3f649aa0b3455c6f20b90dc590be4eb5b1c8f75ff5ba505cdca7b0218cba15f5c2aaa7e629f0699637b19c8ea585c7b66
7
+ data.tar.gz: 55ab1b01de9681e8dbb7df9689b99333cd21746553d7de3de63c8ad01a1387ddc00d47787ef48eeef7a5b6477d3b1432c3202f5d40b3c2401b1294552155a822
data/README.md CHANGED
@@ -56,7 +56,7 @@ end
56
56
  ## Usage
57
57
 
58
58
  The API can be used to access resources owned by an `Identity`, which requires previous authorization from the
59
- corresponding user (see the {omni_auth_nexaas_id gem}[https://rubygems.org/gems/omni_auth_nexaas_id]),
59
+ corresponding user (see the [omni_auth_nexaas_id gem](https://rubygems.org/gems/omni_auth_nexaas_id)),
60
60
  or resources owned by an `Application`, which only requires the application's credentials.
61
61
 
62
62
  ### Resources owned by an Identity
@@ -76,16 +76,16 @@ Here, `user_crendentials` is an object that must have the following attributes a
76
76
  As long as these attributes are available, your object can be of any class (an `Active Record` object or a
77
77
  simple `OpenStruct`, for instance); the client won't make any assumptions about its nature. Your application is responsible
78
78
  for obtaining the initial values for these attributes (through the OAuth2 Authorization Flow, using the
79
- {omni_auth_nexaas_id gem}[https://rubygems.org/gems/omni_auth_nexaas_id]) and storing them as appropriate
79
+ [omni_auth_nexaas_id gem](https://rubygems.org/gems/omni_auth_nexaas_id])) and storing them as appropriate
80
80
  (you might store them using a Users table for instance, or even in your user's session). The client WILL updated these
81
81
  attributes if the token has to be refreshed (Nexaas ID uses a TTL of 2 hours for access tokens) and your application
82
82
  needs to update its storage when that happens.
83
83
 
84
84
  #### Now you have access to the following endpoints:
85
85
 
86
- * [Profile API](TODO: doc link) as `client.profile`
87
- * [SignUp API](TODO: doc link) as `client.signup`
88
- * [Widget API](TODO: doc link) as `client.widget`
86
+ * [Profile API](https://docs.id.nexaas.com/api/profile-data-routes) as `client.profile`
87
+ * [SignUp API](https://docs.id.nexaas.com/api/invitation) as `client.signup`
88
+ * [Widget API](https://docs.id.nexaas.com/api/widget) as `client.widget`
89
89
 
90
90
  #### Examples
91
91
 
@@ -127,7 +127,7 @@ client = NexaasID::Client::Application.new
127
127
 
128
128
  #### Now you have access to the following endpoints:
129
129
 
130
- * [SignUp API](TODO: doc link) as `client.signup`
130
+ * [SignUp API](https://docs.id.nexaas.com/api/invitation) as `client.signup`
131
131
 
132
132
  #### Examples
133
133
 
@@ -21,7 +21,7 @@ class NexaasID::Client::Application
21
21
 
22
22
  private
23
23
 
24
- attr_reader :tokens, :credentials
24
+ attr_reader :tokens
25
25
 
26
26
  def client
27
27
  @client ||= NexaasID::Client::OAuth.build
@@ -8,6 +8,8 @@
8
8
  # client.profile.get
9
9
  #
10
10
  class NexaasID::Client::Identity
11
+ attr_reader :credentials
12
+
11
13
  # Creates an instance of this client.
12
14
  #
13
15
  # @param [
@@ -40,7 +42,6 @@ class NexaasID::Client::Identity
40
42
 
41
43
  private
42
44
 
43
- attr_reader :credentials
44
45
  attr_accessor :token
45
46
 
46
47
  ATTRIBUTES = %i[access_token refresh_token expires_at expires_in].freeze
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module NexaasID
3
- VERSION = "0.5.0".freeze
3
+ VERSION = "0.6.0".freeze
4
4
  end
@@ -26,4 +26,10 @@ describe NexaasID::Client::Identity do
26
26
  end
27
27
  end
28
28
  end
29
+
30
+ describe '#credentials' do
31
+ it 'returns the updated credentials' do
32
+ expect(subject.credentials).to eq(user_credentials)
33
+ end
34
+ end
29
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexaas_id-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Tassinari de Oliveira
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2018-09-10 00:00:00.000000000 Z
14
+ date: 2018-10-11 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: multi_json