passageidentity 0.4.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/CHANGELOG.md +20 -0
- data/README.md +21 -0
- data/docs/generated/{GithubSocialConnection.md → AppleUserSocialConnection.md} +2 -2
- data/docs/generated/{GoogleSocialConnection.md → GithubUserSocialConnection.md} +2 -2
- data/docs/generated/GoogleUserSocialConnection.md +24 -0
- data/docs/generated/Link.md +18 -0
- data/docs/generated/ListPaginatedUsersItem.md +38 -0
- data/docs/generated/ListPaginatedUsersResponse.md +28 -0
- data/docs/generated/Model403Error.md +20 -0
- data/docs/generated/Nonce.md +18 -0
- data/docs/generated/PaginatedLinks.md +26 -0
- data/docs/generated/README.md +12 -6
- data/docs/generated/UserEventStatus.md +15 -0
- data/docs/generated/UserInfo.md +1 -1
- data/docs/generated/{UserEventInfo.md → UserRecentEvent.md} +6 -2
- data/docs/generated/UserSocialConnections.md +6 -4
- data/docs/generated/UsersApi.md +94 -0
- data/lib/openapi_client/api/users_api.rb +96 -0
- data/lib/openapi_client/models/{github_social_connection.rb → apple_user_social_connection.rb} +3 -3
- data/lib/openapi_client/models/{google_social_connection.rb → github_user_social_connection.rb} +3 -3
- data/lib/openapi_client/models/google_user_social_connection.rb +271 -0
- data/lib/openapi_client/models/link.rb +221 -0
- data/lib/openapi_client/models/list_paginated_users_item.rb +399 -0
- data/lib/openapi_client/models/list_paginated_users_response.rb +305 -0
- data/lib/openapi_client/models/magic_link_auth_method.rb +0 -7
- data/lib/openapi_client/models/model401_error.rb +2 -2
- data/lib/openapi_client/models/model403_error.rb +271 -0
- data/lib/openapi_client/models/nonce.rb +222 -0
- data/lib/openapi_client/models/otp_auth_method.rb +3 -10
- data/lib/openapi_client/models/paginated_links.rb +285 -0
- data/lib/openapi_client/models/passkeys_auth_method.rb +0 -7
- data/lib/openapi_client/models/ttl_display_unit.rb +1 -1
- data/lib/openapi_client/models/user_event_status.rb +40 -0
- data/lib/openapi_client/models/user_info.rb +1 -1
- data/lib/openapi_client/models/{user_event_info.rb → user_recent_event.rb} +54 -4
- data/lib/openapi_client/models/user_social_connections.rb +19 -10
- data/lib/openapi_client.rb +14 -6
- data/lib/passageidentity/user_api.rb +40 -0
- data/lib/passageidentity/version.rb +1 -1
- data/tests/user_api_test.rb +41 -0
- metadata +27 -14
- data/docs/generated/UpdateMagicLinkAuthMethod.md +0 -22
- data/docs/generated/UpdateOtpAuthMethod.md +0 -22
- data/docs/generated/UpdatePasskeysAuthMethod.md +0 -18
- /data/lib/{openapi_client/models → models}/update_magic_link_auth_method.rb +0 -0
- /data/lib/{openapi_client/models → models}/update_otp_auth_method.rb +0 -0
- /data/lib/{openapi_client/models → models}/update_passkeys_auth_method.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 830011c410302a4a0a143717b50c48fdc6cf91ba113b04e4b47377935f90eb7c
|
4
|
+
data.tar.gz: 68fc45ff28793a2ccff8f6c481ce7d6759f98a77d724cdfb66cfe226b6f304db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b30cd3d8afd8a51ed8158682afd4988e714b22ee6946df2981afabde67d237a7280995f9f50f05508e21f6a1f1fe9041fd3471e3579bf5c318e8275e349aa98
|
7
|
+
data.tar.gz: a64f6fa42bfd4cb75e707a724ac7560a320dad8da61a2a43bb333dce39301fedeae66f23934b3e9fb8bfdeefba5b47403dfef7989e658bc283f0ab750b951057
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,26 @@
|
|
2
2
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
|
5
|
+
## [0.6.0] - 2024-03-21
|
6
|
+
|
7
|
+
### Added
|
8
|
+
|
9
|
+
- `GetUserByIdentifier` method has been added
|
10
|
+
- `ListPaginatedUsersItem` model has been added
|
11
|
+
|
12
|
+
## [0.5.0] - 2024-01-30
|
13
|
+
|
14
|
+
### Added
|
15
|
+
|
16
|
+
- `AppleUserSocialConnection` model has been added
|
17
|
+
|
18
|
+
### Changed
|
19
|
+
|
20
|
+
- `UserEventInfo` has been renamed to `UserRecentEvent`
|
21
|
+
- Docs have been moved to `/docs`
|
22
|
+
- `GithubSocialConnection` has been renamed to `GithubUserSocialConnection`
|
23
|
+
- `GoogleSocialConnection` has been renamed to `GoogleUserSocialConnection`
|
24
|
+
|
5
25
|
## [0.4.0] - 2024-01-18
|
6
26
|
|
7
27
|
### Added
|
data/README.md
CHANGED
@@ -87,6 +87,27 @@ class ApplicationController < ActionController::Base
|
|
87
87
|
end
|
88
88
|
```
|
89
89
|
|
90
|
+
## Retrieve User Info By Identifier
|
91
|
+
|
92
|
+
To retrieve information about a user, you can also use the `get_by_identifier` method. You will need to use a Passage API key, which can be created in the Passage Console under your Application Settings. This API key grants your web server access to the Passage management APIs to get and update information about users. This API key must be protected and stored in an appropriate secure storage location. It should never be hard-coded in the repository.
|
93
|
+
|
94
|
+
```ruby
|
95
|
+
require 'passageidentity'
|
96
|
+
|
97
|
+
class ApplicationController < ActionController::Base
|
98
|
+
PassageClient =
|
99
|
+
Passage::Client.new(app_id: PASSAGE_APP_ID, api_key: PASSAGE_API_KEY)
|
100
|
+
def authorize!
|
101
|
+
begin
|
102
|
+
user_id = PassageClient.auth.authenticate_request(request)
|
103
|
+
user = PassageClient.user.get_by_identifier(identifier: @identifier)
|
104
|
+
# user is authorized
|
105
|
+
rescue Exception => e
|
106
|
+
# handle exception (user is not authorized)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
```
|
90
111
|
|
91
112
|
## Activate/Deactivate User
|
92
113
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# OpenapiClient::
|
1
|
+
# OpenapiClient::AppleUserSocialConnection
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
```ruby
|
15
15
|
require 'openapi_client'
|
16
16
|
|
17
|
-
instance = OpenapiClient::
|
17
|
+
instance = OpenapiClient::AppleUserSocialConnection.new(
|
18
18
|
provider_id: null,
|
19
19
|
created_at: null,
|
20
20
|
last_login_at: null,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# OpenapiClient::
|
1
|
+
# OpenapiClient::GithubUserSocialConnection
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
```ruby
|
15
15
|
require 'openapi_client'
|
16
16
|
|
17
|
-
instance = OpenapiClient::
|
17
|
+
instance = OpenapiClient::GithubUserSocialConnection.new(
|
18
18
|
provider_id: null,
|
19
19
|
created_at: null,
|
20
20
|
last_login_at: null,
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# OpenapiClient::GoogleUserSocialConnection
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **provider_id** | **String** | The external ID of the Social Connection. | |
|
8
|
+
| **created_at** | **Time** | | |
|
9
|
+
| **last_login_at** | **Time** | | |
|
10
|
+
| **provider_identifier** | **String** | The email of connected social user. | |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'openapi_client'
|
16
|
+
|
17
|
+
instance = OpenapiClient::GoogleUserSocialConnection.new(
|
18
|
+
provider_id: null,
|
19
|
+
created_at: null,
|
20
|
+
last_login_at: null,
|
21
|
+
provider_identifier: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# OpenapiClient::Link
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **href** | **String** | | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'openapi_client'
|
13
|
+
|
14
|
+
instance = OpenapiClient::Link.new(
|
15
|
+
href: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# OpenapiClient::ListPaginatedUsersItem
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **created_at** | **Time** | | |
|
8
|
+
| **email** | **String** | | |
|
9
|
+
| **email_verified** | **Boolean** | | |
|
10
|
+
| **id** | **String** | | |
|
11
|
+
| **last_login_at** | **Time** | | |
|
12
|
+
| **login_count** | **Integer** | | |
|
13
|
+
| **phone** | **String** | | |
|
14
|
+
| **phone_verified** | **Boolean** | | |
|
15
|
+
| **status** | [**UserStatus**](UserStatus.md) | | |
|
16
|
+
| **updated_at** | **Time** | | |
|
17
|
+
| **user_metadata** | **Object** | | |
|
18
|
+
|
19
|
+
## Example
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
require 'openapi_client'
|
23
|
+
|
24
|
+
instance = OpenapiClient::ListPaginatedUsersItem.new(
|
25
|
+
created_at: null,
|
26
|
+
email: null,
|
27
|
+
email_verified: null,
|
28
|
+
id: null,
|
29
|
+
last_login_at: null,
|
30
|
+
login_count: null,
|
31
|
+
phone: null,
|
32
|
+
phone_verified: null,
|
33
|
+
status: null,
|
34
|
+
updated_at: null,
|
35
|
+
user_metadata: null
|
36
|
+
)
|
37
|
+
```
|
38
|
+
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# OpenapiClient::ListPaginatedUsersResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **_links** | [**PaginatedLinks**](PaginatedLinks.md) | | |
|
8
|
+
| **created_before** | **Integer** | time anchor (Unix timestamp) --> all users returned created before this timestamp | |
|
9
|
+
| **limit** | **Integer** | | |
|
10
|
+
| **page** | **Integer** | | |
|
11
|
+
| **total_users** | **Integer** | total number of users for a particular query | |
|
12
|
+
| **users** | [**Array<ListPaginatedUsersItem>**](ListPaginatedUsersItem.md) | | |
|
13
|
+
|
14
|
+
## Example
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'openapi_client'
|
18
|
+
|
19
|
+
instance = OpenapiClient::ListPaginatedUsersResponse.new(
|
20
|
+
_links: null,
|
21
|
+
created_before: null,
|
22
|
+
limit: null,
|
23
|
+
page: null,
|
24
|
+
total_users: null,
|
25
|
+
users: null
|
26
|
+
)
|
27
|
+
```
|
28
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# OpenapiClient::Model403Error
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **code** | **String** | | |
|
8
|
+
| **error** | **String** | | |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'openapi_client'
|
14
|
+
|
15
|
+
instance = OpenapiClient::Model403Error.new(
|
16
|
+
code: null,
|
17
|
+
error: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# OpenapiClient::Nonce
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **nonce** | **String** | | |
|
8
|
+
|
9
|
+
## Example
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
require 'openapi_client'
|
13
|
+
|
14
|
+
instance = OpenapiClient::Nonce.new(
|
15
|
+
nonce: null
|
16
|
+
)
|
17
|
+
```
|
18
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# OpenapiClient::PaginatedLinks
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **first** | [**Link**](Link.md) | | |
|
8
|
+
| **last** | [**Link**](Link.md) | | |
|
9
|
+
| **_next** | [**Link**](Link.md) | | |
|
10
|
+
| **previous** | [**Link**](Link.md) | | |
|
11
|
+
| **_self** | [**Link**](Link.md) | | |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'openapi_client'
|
17
|
+
|
18
|
+
instance = OpenapiClient::PaginatedLinks.new(
|
19
|
+
first: null,
|
20
|
+
last: null,
|
21
|
+
_next: null,
|
22
|
+
previous: null,
|
23
|
+
_self: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
data/docs/generated/README.md
CHANGED
@@ -96,6 +96,7 @@ Class | Method | HTTP request | Description
|
|
96
96
|
*OpenapiClient::UsersApi* | [**deactivate_user**](docs/UsersApi.md#deactivate_user) | **PATCH** /apps/{app_id}/users/{user_id}/deactivate | Deactivate User
|
97
97
|
*OpenapiClient::UsersApi* | [**delete_user**](docs/UsersApi.md#delete_user) | **DELETE** /apps/{app_id}/users/{user_id} | Delete User
|
98
98
|
*OpenapiClient::UsersApi* | [**get_user**](docs/UsersApi.md#get_user) | **GET** /apps/{app_id}/users/{user_id} | Get User
|
99
|
+
*OpenapiClient::UsersApi* | [**list_paginated_users**](docs/UsersApi.md#list_paginated_users) | **GET** /apps/{app_id}/users | List Users
|
99
100
|
*OpenapiClient::UsersApi* | [**update_user**](docs/UsersApi.md#update_user) | **PATCH** /apps/{app_id}/users/{user_id} | Update User
|
100
101
|
|
101
102
|
|
@@ -103,16 +104,20 @@ Class | Method | HTTP request | Description
|
|
103
104
|
|
104
105
|
- [OpenapiClient::AppInfo](docs/AppInfo.md)
|
105
106
|
- [OpenapiClient::AppResponse](docs/AppResponse.md)
|
107
|
+
- [OpenapiClient::AppleUserSocialConnection](docs/AppleUserSocialConnection.md)
|
106
108
|
- [OpenapiClient::AuthMethods](docs/AuthMethods.md)
|
107
109
|
- [OpenapiClient::CreateMagicLinkRequest](docs/CreateMagicLinkRequest.md)
|
108
110
|
- [OpenapiClient::CreateUserRequest](docs/CreateUserRequest.md)
|
109
111
|
- [OpenapiClient::ElementCustomization](docs/ElementCustomization.md)
|
110
112
|
- [OpenapiClient::FontFamily](docs/FontFamily.md)
|
111
|
-
- [OpenapiClient::
|
112
|
-
- [OpenapiClient::
|
113
|
+
- [OpenapiClient::GithubUserSocialConnection](docs/GithubUserSocialConnection.md)
|
114
|
+
- [OpenapiClient::GoogleUserSocialConnection](docs/GoogleUserSocialConnection.md)
|
113
115
|
- [OpenapiClient::LayoutConfig](docs/LayoutConfig.md)
|
114
116
|
- [OpenapiClient::Layouts](docs/Layouts.md)
|
117
|
+
- [OpenapiClient::Link](docs/Link.md)
|
115
118
|
- [OpenapiClient::ListDevicesResponse](docs/ListDevicesResponse.md)
|
119
|
+
- [OpenapiClient::ListPaginatedUsersItem](docs/ListPaginatedUsersItem.md)
|
120
|
+
- [OpenapiClient::ListPaginatedUsersResponse](docs/ListPaginatedUsersResponse.md)
|
116
121
|
- [OpenapiClient::MagicLink](docs/MagicLink.md)
|
117
122
|
- [OpenapiClient::MagicLinkAuthMethod](docs/MagicLinkAuthMethod.md)
|
118
123
|
- [OpenapiClient::MagicLinkChannel](docs/MagicLinkChannel.md)
|
@@ -120,20 +125,21 @@ Class | Method | HTTP request | Description
|
|
120
125
|
- [OpenapiClient::MagicLinkType](docs/MagicLinkType.md)
|
121
126
|
- [OpenapiClient::Model400Error](docs/Model400Error.md)
|
122
127
|
- [OpenapiClient::Model401Error](docs/Model401Error.md)
|
128
|
+
- [OpenapiClient::Model403Error](docs/Model403Error.md)
|
123
129
|
- [OpenapiClient::Model404Error](docs/Model404Error.md)
|
124
130
|
- [OpenapiClient::Model500Error](docs/Model500Error.md)
|
131
|
+
- [OpenapiClient::Nonce](docs/Nonce.md)
|
125
132
|
- [OpenapiClient::OtpAuthMethod](docs/OtpAuthMethod.md)
|
133
|
+
- [OpenapiClient::PaginatedLinks](docs/PaginatedLinks.md)
|
126
134
|
- [OpenapiClient::PasskeysAuthMethod](docs/PasskeysAuthMethod.md)
|
127
135
|
- [OpenapiClient::Technologies](docs/Technologies.md)
|
128
136
|
- [OpenapiClient::TtlDisplayUnit](docs/TtlDisplayUnit.md)
|
129
|
-
- [OpenapiClient::UpdateMagicLinkAuthMethod](docs/UpdateMagicLinkAuthMethod.md)
|
130
|
-
- [OpenapiClient::UpdateOtpAuthMethod](docs/UpdateOtpAuthMethod.md)
|
131
|
-
- [OpenapiClient::UpdatePasskeysAuthMethod](docs/UpdatePasskeysAuthMethod.md)
|
132
137
|
- [OpenapiClient::UpdateUserRequest](docs/UpdateUserRequest.md)
|
133
|
-
- [OpenapiClient::
|
138
|
+
- [OpenapiClient::UserEventStatus](docs/UserEventStatus.md)
|
134
139
|
- [OpenapiClient::UserInfo](docs/UserInfo.md)
|
135
140
|
- [OpenapiClient::UserMetadataField](docs/UserMetadataField.md)
|
136
141
|
- [OpenapiClient::UserMetadataFieldType](docs/UserMetadataFieldType.md)
|
142
|
+
- [OpenapiClient::UserRecentEvent](docs/UserRecentEvent.md)
|
137
143
|
- [OpenapiClient::UserResponse](docs/UserResponse.md)
|
138
144
|
- [OpenapiClient::UserSocialConnections](docs/UserSocialConnections.md)
|
139
145
|
- [OpenapiClient::UserStatus](docs/UserStatus.md)
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# OpenapiClient::UserEventStatus
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
|
8
|
+
## Example
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
require 'openapi_client'
|
12
|
+
|
13
|
+
instance = OpenapiClient::UserEventStatus.new()
|
14
|
+
```
|
15
|
+
|
data/docs/generated/UserInfo.md
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
| **login_count** | **Integer** | | |
|
13
13
|
| **phone** | **String** | | |
|
14
14
|
| **phone_verified** | **Boolean** | | |
|
15
|
-
| **recent_events** | [**Array<
|
15
|
+
| **recent_events** | [**Array<UserRecentEvent>**](UserRecentEvent.md) | | |
|
16
16
|
| **social_connections** | [**UserSocialConnections**](UserSocialConnections.md) | | |
|
17
17
|
| **status** | [**UserStatus**](UserStatus.md) | | |
|
18
18
|
| **updated_at** | **Time** | | |
|
@@ -1,12 +1,14 @@
|
|
1
|
-
# OpenapiClient::
|
1
|
+
# OpenapiClient::UserRecentEvent
|
2
2
|
|
3
3
|
## Properties
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **created_at** | **Time** | | |
|
8
|
+
| **completed_at** | **Time** | | |
|
8
9
|
| **id** | **String** | | |
|
9
10
|
| **ip_addr** | **String** | | |
|
11
|
+
| **status** | [**UserEventStatus**](UserEventStatus.md) | | |
|
10
12
|
| **type** | **String** | | |
|
11
13
|
| **user_agent** | **String** | | |
|
12
14
|
|
@@ -15,10 +17,12 @@
|
|
15
17
|
```ruby
|
16
18
|
require 'openapi_client'
|
17
19
|
|
18
|
-
instance = OpenapiClient::
|
20
|
+
instance = OpenapiClient::UserRecentEvent.new(
|
19
21
|
created_at: null,
|
22
|
+
completed_at: null,
|
20
23
|
id: null,
|
21
24
|
ip_addr: null,
|
25
|
+
status: null,
|
22
26
|
type: null,
|
23
27
|
user_agent: null
|
24
28
|
)
|
@@ -4,8 +4,9 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **
|
8
|
-
| **github** | [**
|
7
|
+
| **apple** | [**AppleUserSocialConnection**](AppleUserSocialConnection.md) | | [optional] |
|
8
|
+
| **github** | [**GithubUserSocialConnection**](GithubUserSocialConnection.md) | | [optional] |
|
9
|
+
| **google** | [**GoogleUserSocialConnection**](GoogleUserSocialConnection.md) | | [optional] |
|
9
10
|
|
10
11
|
## Example
|
11
12
|
|
@@ -13,8 +14,9 @@
|
|
13
14
|
require 'openapi_client'
|
14
15
|
|
15
16
|
instance = OpenapiClient::UserSocialConnections.new(
|
16
|
-
|
17
|
-
github: null
|
17
|
+
apple: null,
|
18
|
+
github: null,
|
19
|
+
google: null
|
18
20
|
)
|
19
21
|
```
|
20
22
|
|
data/docs/generated/UsersApi.md
CHANGED
@@ -9,6 +9,7 @@ All URIs are relative to *https://api.passage.id/v1*
|
|
9
9
|
| [**deactivate_user**](UsersApi.md#deactivate_user) | **PATCH** /apps/{app_id}/users/{user_id}/deactivate | Deactivate User |
|
10
10
|
| [**delete_user**](UsersApi.md#delete_user) | **DELETE** /apps/{app_id}/users/{user_id} | Delete User |
|
11
11
|
| [**get_user**](UsersApi.md#get_user) | **GET** /apps/{app_id}/users/{user_id} | Get User |
|
12
|
+
| [**list_paginated_users**](UsersApi.md#list_paginated_users) | **GET** /apps/{app_id}/users | List Users |
|
12
13
|
| [**update_user**](UsersApi.md#update_user) | **PATCH** /apps/{app_id}/users/{user_id} | Update User |
|
13
14
|
|
14
15
|
|
@@ -366,6 +367,99 @@ end
|
|
366
367
|
- **Accept**: application/json
|
367
368
|
|
368
369
|
|
370
|
+
## list_paginated_users
|
371
|
+
|
372
|
+
> <ListPaginatedUsersResponse> list_paginated_users(app_id, opts)
|
373
|
+
|
374
|
+
List Users
|
375
|
+
|
376
|
+
List users for an app.
|
377
|
+
|
378
|
+
### Examples
|
379
|
+
|
380
|
+
```ruby
|
381
|
+
require 'time'
|
382
|
+
require 'openapi_client'
|
383
|
+
# setup authorization
|
384
|
+
OpenapiClient.configure do |config|
|
385
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
386
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
387
|
+
end
|
388
|
+
|
389
|
+
api_instance = OpenapiClient::UsersApi.new
|
390
|
+
app_id = 'app_id_example' # String | App ID
|
391
|
+
opts = {
|
392
|
+
page: 56, # Integer | page to fetch (min=1)
|
393
|
+
limit: 56, # Integer | number of users to fetch per page (max=500)
|
394
|
+
created_before: 56, # Integer | Unix timestamp to anchor pagination results (fetches events that were created before the timestamp)
|
395
|
+
order_by: 'order_by_example', # String | Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier`
|
396
|
+
identifier: 'identifier_example', # String | search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>)
|
397
|
+
id: 'id_example', # String | search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>)
|
398
|
+
login_count: 56, # Integer | search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>)
|
399
|
+
status: 'status_example', # String | search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending)
|
400
|
+
created_at: 'created_at_example', # String | search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
|
401
|
+
updated_at: 'updated_at_example', # String | search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
|
402
|
+
last_login_at: 'last_login_at_example' # String | search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
|
403
|
+
}
|
404
|
+
|
405
|
+
begin
|
406
|
+
# List Users
|
407
|
+
result = api_instance.list_paginated_users(app_id, opts)
|
408
|
+
p result
|
409
|
+
rescue OpenapiClient::ApiError => e
|
410
|
+
puts "Error when calling UsersApi->list_paginated_users: #{e}"
|
411
|
+
end
|
412
|
+
```
|
413
|
+
|
414
|
+
#### Using the list_paginated_users_with_http_info variant
|
415
|
+
|
416
|
+
This returns an Array which contains the response data, status code and headers.
|
417
|
+
|
418
|
+
> <Array(<ListPaginatedUsersResponse>, Integer, Hash)> list_paginated_users_with_http_info(app_id, opts)
|
419
|
+
|
420
|
+
```ruby
|
421
|
+
begin
|
422
|
+
# List Users
|
423
|
+
data, status_code, headers = api_instance.list_paginated_users_with_http_info(app_id, opts)
|
424
|
+
p status_code # => 2xx
|
425
|
+
p headers # => { ... }
|
426
|
+
p data # => <ListPaginatedUsersResponse>
|
427
|
+
rescue OpenapiClient::ApiError => e
|
428
|
+
puts "Error when calling UsersApi->list_paginated_users_with_http_info: #{e}"
|
429
|
+
end
|
430
|
+
```
|
431
|
+
|
432
|
+
### Parameters
|
433
|
+
|
434
|
+
| Name | Type | Description | Notes |
|
435
|
+
| ---- | ---- | ----------- | ----- |
|
436
|
+
| **app_id** | **String** | App ID | |
|
437
|
+
| **page** | **Integer** | page to fetch (min=1) | [optional] |
|
438
|
+
| **limit** | **Integer** | number of users to fetch per page (max=500) | [optional] |
|
439
|
+
| **created_before** | **Integer** | Unix timestamp to anchor pagination results (fetches events that were created before the timestamp) | [optional] |
|
440
|
+
| **order_by** | **String** | Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier` | [optional] |
|
441
|
+
| **identifier** | **String** | search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>) | [optional] |
|
442
|
+
| **id** | **String** | search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>) | [optional] |
|
443
|
+
| **login_count** | **Integer** | search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>) | [optional] |
|
444
|
+
| **status** | **String** | search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending) | [optional] |
|
445
|
+
| **created_at** | **String** | search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required | [optional] |
|
446
|
+
| **updated_at** | **String** | search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required | [optional] |
|
447
|
+
| **last_login_at** | **String** | search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required | [optional] |
|
448
|
+
|
449
|
+
### Return type
|
450
|
+
|
451
|
+
[**ListPaginatedUsersResponse**](ListPaginatedUsersResponse.md)
|
452
|
+
|
453
|
+
### Authorization
|
454
|
+
|
455
|
+
[bearerAuth](../README.md#bearerAuth)
|
456
|
+
|
457
|
+
### HTTP request headers
|
458
|
+
|
459
|
+
- **Content-Type**: Not defined
|
460
|
+
- **Accept**: application/json
|
461
|
+
|
462
|
+
|
369
463
|
## update_user
|
370
464
|
|
371
465
|
> <UserResponse> update_user(app_id, user_id, update_user_request)
|
@@ -369,6 +369,102 @@ module OpenapiClient
|
|
369
369
|
return data, status_code, headers
|
370
370
|
end
|
371
371
|
|
372
|
+
# List Users
|
373
|
+
# List users for an app.
|
374
|
+
# @param app_id [String] App ID
|
375
|
+
# @param [Hash] opts the optional parameters
|
376
|
+
# @option opts [Integer] :page page to fetch (min=1)
|
377
|
+
# @option opts [Integer] :limit number of users to fetch per page (max=500)
|
378
|
+
# @option opts [Integer] :created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp)
|
379
|
+
# @option opts [String] :order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier`
|
380
|
+
# @option opts [String] :identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>)
|
381
|
+
# @option opts [String] :id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>)
|
382
|
+
# @option opts [Integer] :login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>)
|
383
|
+
# @option opts [String] :status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending)
|
384
|
+
# @option opts [String] :created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
|
385
|
+
# @option opts [String] :updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
|
386
|
+
# @option opts [String] :last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
|
387
|
+
# @return [ListPaginatedUsersResponse]
|
388
|
+
def list_paginated_users(app_id, opts = {})
|
389
|
+
data, _status_code, _headers = list_paginated_users_with_http_info(app_id, opts)
|
390
|
+
data
|
391
|
+
end
|
392
|
+
|
393
|
+
# List Users
|
394
|
+
# List users for an app.
|
395
|
+
# @param app_id [String] App ID
|
396
|
+
# @param [Hash] opts the optional parameters
|
397
|
+
# @option opts [Integer] :page page to fetch (min=1)
|
398
|
+
# @option opts [Integer] :limit number of users to fetch per page (max=500)
|
399
|
+
# @option opts [Integer] :created_before Unix timestamp to anchor pagination results (fetches events that were created before the timestamp)
|
400
|
+
# @option opts [String] :order_by Comma separated list of <field>:<ASC/DESC> (example: order_by=id:DESC,created_at:ASC) **cannot order_by `identifier`
|
401
|
+
# @option opts [String] :identifier search users email OR phone (pagination prepended operators identifier=<val>, identifier=<ne:val>, identifier=<gt:val>, identifier=<lt:val>, identifier=<like:val>, identifier=<not_like:val>)
|
402
|
+
# @option opts [String] :id search users id (pagination prepended operators id=<val>, id=<ne:val>, id=<gt:val>, id=<lt:val>, id=<like:val>, id=<not_like:val>)
|
403
|
+
# @option opts [Integer] :login_count search users login_count (pagination prepended operators login_count=<val>, login_count=<ne:val>, login_count=<gt:val>, login_count=<lt:val>)
|
404
|
+
# @option opts [String] :status search users by status (pagination prepended operators status=<val>, status=<ne:val>, status=<gt:val>, status=<lt:val>, status=<like:val>, status=<not_like:val>) -- valid values: (active, inactive, pending)
|
405
|
+
# @option opts [String] :created_at search users created_at (pagination prepended operators created_at=<val>, created_at=<ne:val>, created_at=<gt:val>, created_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
|
406
|
+
# @option opts [String] :updated_at search users updated_at (pagination prepended operators updated_at=<val>, updated_at=<ne:val>, updated_at=<gt:val>, updated_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
|
407
|
+
# @option opts [String] :last_login_at search users last_login_at (pagination prepended operators last_login_at=<val>, lat_login_at=<ne:val>, last_login_at=<gt:val>, last_login_at=<lt:val> -- valid timestamp in the format: 2006-01-02T15:04:05.000000Z required
|
408
|
+
# @return [Array<(ListPaginatedUsersResponse, Integer, Hash)>] ListPaginatedUsersResponse data, response status code and response headers
|
409
|
+
def list_paginated_users_with_http_info(app_id, opts = {})
|
410
|
+
if @api_client.config.debugging
|
411
|
+
@api_client.config.logger.debug 'Calling API: UsersApi.list_paginated_users ...'
|
412
|
+
end
|
413
|
+
# verify the required parameter 'app_id' is set
|
414
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
415
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling UsersApi.list_paginated_users"
|
416
|
+
end
|
417
|
+
# resource path
|
418
|
+
local_var_path = '/apps/{app_id}/users'.sub('{' + 'app_id' + '}', CGI.escape(app_id.to_s))
|
419
|
+
|
420
|
+
# query parameters
|
421
|
+
query_params = opts[:query_params] || {}
|
422
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
423
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
424
|
+
query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
425
|
+
query_params[:'order_by'] = opts[:'order_by'] if !opts[:'order_by'].nil?
|
426
|
+
query_params[:'identifier'] = opts[:'identifier'] if !opts[:'identifier'].nil?
|
427
|
+
query_params[:'id'] = opts[:'id'] if !opts[:'id'].nil?
|
428
|
+
query_params[:'login_count'] = opts[:'login_count'] if !opts[:'login_count'].nil?
|
429
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
430
|
+
query_params[:'created_at'] = opts[:'created_at'] if !opts[:'created_at'].nil?
|
431
|
+
query_params[:'updated_at'] = opts[:'updated_at'] if !opts[:'updated_at'].nil?
|
432
|
+
query_params[:'last_login_at'] = opts[:'last_login_at'] if !opts[:'last_login_at'].nil?
|
433
|
+
|
434
|
+
# header parameters
|
435
|
+
header_params = opts[:header_params] || {}
|
436
|
+
# HTTP header 'Accept' (if needed)
|
437
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
438
|
+
|
439
|
+
# form parameters
|
440
|
+
form_params = opts[:form_params] || {}
|
441
|
+
|
442
|
+
# http body (model)
|
443
|
+
post_body = opts[:debug_body]
|
444
|
+
|
445
|
+
# return_type
|
446
|
+
return_type = opts[:debug_return_type] || 'ListPaginatedUsersResponse'
|
447
|
+
|
448
|
+
# auth_names
|
449
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
450
|
+
|
451
|
+
new_options = opts.merge(
|
452
|
+
:operation => :"UsersApi.list_paginated_users",
|
453
|
+
:header_params => header_params,
|
454
|
+
:query_params => query_params,
|
455
|
+
:form_params => form_params,
|
456
|
+
:body => post_body,
|
457
|
+
:auth_names => auth_names,
|
458
|
+
:return_type => return_type
|
459
|
+
)
|
460
|
+
|
461
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
462
|
+
if @api_client.config.debugging
|
463
|
+
@api_client.config.logger.debug "API called: UsersApi#list_paginated_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
464
|
+
end
|
465
|
+
return data, status_code, headers
|
466
|
+
end
|
467
|
+
|
372
468
|
# Update User
|
373
469
|
# Update a user's information.
|
374
470
|
# @param app_id [String] App ID
|