Skip to content

Commit

Permalink
SDK updates - getUserByIdentifier
Browse files Browse the repository at this point in the history
SDK updates
  • Loading branch information
tdeshong authored Mar 26, 2024
2 parents 8007062 + 29a48d2 commit 21c5ff4
Show file tree
Hide file tree
Showing 35 changed files with 2,281 additions and 93 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file.

## [0.6.0] - 2024-03-21

### Added

- `GetUserByIdentifier` method has been added
- `ListPaginatedUsersItem` model has been added

## [0.5.0] - 2024-01-30

### Added
Expand Down
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,27 @@ class ApplicationController < ActionController::Base
end
```

## Retrieve User Info By Identifier

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.

```ruby
require 'passageidentity'

class ApplicationController < ActionController::Base
PassageClient =
Passage::Client.new(app_id: PASSAGE_APP_ID, api_key: PASSAGE_API_KEY)
def authorize!
begin
user_id = PassageClient.auth.authenticate_request(request)
user = PassageClient.user.get_by_identifier(identifier: @identifier)
# user is authorized
rescue Exception => e
# handle exception (user is not authorized)
end
end
end
```

## Activate/Deactivate User

Expand Down
18 changes: 18 additions & 0 deletions docs/generated/Link.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# OpenapiClient::Link

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **href** | **String** | | |

## Example

```ruby
require 'openapi_client'

instance = OpenapiClient::Link.new(
href: null
)
```

38 changes: 38 additions & 0 deletions docs/generated/ListPaginatedUsersItem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# OpenapiClient::ListPaginatedUsersItem

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **created_at** | **Time** | | |
| **email** | **String** | | |
| **email_verified** | **Boolean** | | |
| **id** | **String** | | |
| **last_login_at** | **Time** | | |
| **login_count** | **Integer** | | |
| **phone** | **String** | | |
| **phone_verified** | **Boolean** | | |
| **status** | [**UserStatus**](UserStatus.md) | | |
| **updated_at** | **Time** | | |
| **user_metadata** | **Object** | | |

## Example

```ruby
require 'openapi_client'

instance = OpenapiClient::ListPaginatedUsersItem.new(
created_at: null,
email: null,
email_verified: null,
id: null,
last_login_at: null,
login_count: null,
phone: null,
phone_verified: null,
status: null,
updated_at: null,
user_metadata: null
)
```

28 changes: 28 additions & 0 deletions docs/generated/ListPaginatedUsersResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# OpenapiClient::ListPaginatedUsersResponse

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **_links** | [**PaginatedLinks**](PaginatedLinks.md) | | |
| **created_before** | **Integer** | time anchor (Unix timestamp) --&gt; all users returned created before this timestamp | |
| **limit** | **Integer** | | |
| **page** | **Integer** | | |
| **total_users** | **Integer** | total number of users for a particular query | |
| **users** | [**Array&lt;ListPaginatedUsersItem&gt;**](ListPaginatedUsersItem.md) | | |

## Example

```ruby
require 'openapi_client'

instance = OpenapiClient::ListPaginatedUsersResponse.new(
_links: null,
created_before: null,
limit: null,
page: null,
total_users: null,
users: null
)
```

20 changes: 20 additions & 0 deletions docs/generated/Model403Error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# OpenapiClient::Model403Error

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **code** | **String** | | |
| **error** | **String** | | |

## Example

```ruby
require 'openapi_client'

instance = OpenapiClient::Model403Error.new(
code: null,
error: null
)
```

18 changes: 18 additions & 0 deletions docs/generated/Nonce.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# OpenapiClient::Nonce

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **nonce** | **String** | | |

## Example

```ruby
require 'openapi_client'

instance = OpenapiClient::Nonce.new(
nonce: null
)
```

26 changes: 26 additions & 0 deletions docs/generated/PaginatedLinks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# OpenapiClient::PaginatedLinks

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **first** | [**Link**](Link.md) | | |
| **last** | [**Link**](Link.md) | | |
| **_next** | [**Link**](Link.md) | | |
| **previous** | [**Link**](Link.md) | | |
| **_self** | [**Link**](Link.md) | | |

## Example

```ruby
require 'openapi_client'

instance = OpenapiClient::PaginatedLinks.new(
first: null,
last: null,
_next: null,
previous: null,
_self: null
)
```

11 changes: 8 additions & 3 deletions docs/generated/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Class | Method | HTTP request | Description
*OpenapiClient::UsersApi* | [**deactivate_user**](docs/UsersApi.md#deactivate_user) | **PATCH** /apps/{app_id}/users/{user_id}/deactivate | Deactivate User
*OpenapiClient::UsersApi* | [**delete_user**](docs/UsersApi.md#delete_user) | **DELETE** /apps/{app_id}/users/{user_id} | Delete User
*OpenapiClient::UsersApi* | [**get_user**](docs/UsersApi.md#get_user) | **GET** /apps/{app_id}/users/{user_id} | Get User
*OpenapiClient::UsersApi* | [**list_paginated_users**](docs/UsersApi.md#list_paginated_users) | **GET** /apps/{app_id}/users | List Users
*OpenapiClient::UsersApi* | [**update_user**](docs/UsersApi.md#update_user) | **PATCH** /apps/{app_id}/users/{user_id} | Update User


Expand All @@ -113,24 +114,28 @@ Class | Method | HTTP request | Description
- [OpenapiClient::GoogleUserSocialConnection](docs/GoogleUserSocialConnection.md)
- [OpenapiClient::LayoutConfig](docs/LayoutConfig.md)
- [OpenapiClient::Layouts](docs/Layouts.md)
- [OpenapiClient::Link](docs/Link.md)
- [OpenapiClient::ListDevicesResponse](docs/ListDevicesResponse.md)
- [OpenapiClient::ListPaginatedUsersItem](docs/ListPaginatedUsersItem.md)
- [OpenapiClient::ListPaginatedUsersResponse](docs/ListPaginatedUsersResponse.md)
- [OpenapiClient::MagicLink](docs/MagicLink.md)
- [OpenapiClient::MagicLinkAuthMethod](docs/MagicLinkAuthMethod.md)
- [OpenapiClient::MagicLinkChannel](docs/MagicLinkChannel.md)
- [OpenapiClient::MagicLinkResponse](docs/MagicLinkResponse.md)
- [OpenapiClient::MagicLinkType](docs/MagicLinkType.md)
- [OpenapiClient::Model400Error](docs/Model400Error.md)
- [OpenapiClient::Model401Error](docs/Model401Error.md)
- [OpenapiClient::Model403Error](docs/Model403Error.md)
- [OpenapiClient::Model404Error](docs/Model404Error.md)
- [OpenapiClient::Model500Error](docs/Model500Error.md)
- [OpenapiClient::Nonce](docs/Nonce.md)
- [OpenapiClient::OtpAuthMethod](docs/OtpAuthMethod.md)
- [OpenapiClient::PaginatedLinks](docs/PaginatedLinks.md)
- [OpenapiClient::PasskeysAuthMethod](docs/PasskeysAuthMethod.md)
- [OpenapiClient::Technologies](docs/Technologies.md)
- [OpenapiClient::TtlDisplayUnit](docs/TtlDisplayUnit.md)
- [OpenapiClient::UpdateMagicLinkAuthMethod](docs/UpdateMagicLinkAuthMethod.md)
- [OpenapiClient::UpdateOtpAuthMethod](docs/UpdateOtpAuthMethod.md)
- [OpenapiClient::UpdatePasskeysAuthMethod](docs/UpdatePasskeysAuthMethod.md)
- [OpenapiClient::UpdateUserRequest](docs/UpdateUserRequest.md)
- [OpenapiClient::UserEventStatus](docs/UserEventStatus.md)
- [OpenapiClient::UserInfo](docs/UserInfo.md)
- [OpenapiClient::UserMetadataField](docs/UserMetadataField.md)
- [OpenapiClient::UserMetadataFieldType](docs/UserMetadataFieldType.md)
Expand Down
22 changes: 0 additions & 22 deletions docs/generated/UpdateMagicLinkAuthMethod.md

This file was deleted.

22 changes: 0 additions & 22 deletions docs/generated/UpdateOtpAuthMethod.md

This file was deleted.

18 changes: 0 additions & 18 deletions docs/generated/UpdatePasskeysAuthMethod.md

This file was deleted.

15 changes: 15 additions & 0 deletions docs/generated/UserEventStatus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# OpenapiClient::UserEventStatus

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |

## Example

```ruby
require 'openapi_client'

instance = OpenapiClient::UserEventStatus.new()
```

4 changes: 4 additions & 0 deletions docs/generated/UserRecentEvent.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **created_at** | **Time** | | |
| **completed_at** | **Time** | | |
| **id** | **String** | | |
| **ip_addr** | **String** | | |
| **status** | [**UserEventStatus**](UserEventStatus.md) | | |
| **type** | **String** | | |
| **user_agent** | **String** | | |

Expand All @@ -17,8 +19,10 @@ require 'openapi_client'

instance = OpenapiClient::UserRecentEvent.new(
created_at: null,
completed_at: null,
id: null,
ip_addr: null,
status: null,
type: null,
user_agent: null
)
Expand Down
Loading

0 comments on commit 21c5ff4

Please sign in to comment.