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 +4 -4
- data/README.md +6 -6
- data/lib/nexaas_id/client/application.rb +1 -1
- data/lib/nexaas_id/client/identity.rb +2 -1
- data/lib/nexaas_id/version.rb +1 -1
- data/spec/nexaas_id/client/identity_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3bd50fd55bf1b80459593dc7cd5b6b95de5126c047e6a13c74019528704f981
|
4
|
+
data.tar.gz: ff3c81132f73b8ea52d488b55cc9a1a48ecb56d4d9e2a194d743ca402d28f67d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
-
|
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](
|
87
|
-
* [SignUp API](
|
88
|
-
* [Widget API](
|
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](
|
130
|
+
* [SignUp API](https://docs.id.nexaas.com/api/invitation) as `client.signup`
|
131
131
|
|
132
132
|
#### Examples
|
133
133
|
|
@@ -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
|
data/lib/nexaas_id/version.rb
CHANGED
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.
|
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-
|
14
|
+
date: 2018-10-11 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: multi_json
|