passageidentity 0.6.1 → 0.6.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: '08f4e03fb81dc561667b58f12c1be2e8add4599cab6e062abaa864f2e5bf8216'
4
- data.tar.gz: cab51189540d53901348a97714bb5a1c7a606fd5a7d0a17f3d11d740d4d7a76d
3
+ metadata.gz: 8cd467636d69820affe2b8c7132a5020043465a982176d1fe78e0a8e505528d8
4
+ data.tar.gz: 2ca83b8a479ab84dfe3e8c995684b4cbb0b5a8c8051cb9eefbcc370ed3a36936
5
5
  SHA512:
6
- metadata.gz: 5f6b86e9cdf0aeb7ddb9b1595c0ede7322debf43601b85c17b72a39705a968f9ad7b1ad31dbc522b6f17ec83ddf76e379cc4df3a1463ce05f3b4a0f5dd1c5e91
7
- data.tar.gz: 8f65d4dfbfed2ccfbbc15ca3ec2cb78cafbdc3680dac5c6806af9bdeb956c987f91704a87f333720c2385618d691da5e7e1af07472281b9c4426f5cd528cb6be
6
+ metadata.gz: 89e9d432cea8930db2686f203813f28ac902fde133080aa150987147e57aec8b2115b5c30b2fde84839e348b539239e09c2c7220f6f5ae1471b92b2b8f11b3b8
7
+ data.tar.gz: 599688eac0e4ac800315dc07cd47f73c7a04349db737526b492ab5fdeb57049de936b17e406d01d057085a2170794f8939b4cda719adcb3f95d89abd554c1508
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ## [0.6.2] - 2024-10-22
6
+
7
+ ### Changed
8
+
9
+ - Update to the new README template, updated license, updated metadata in gemspec file
10
+
5
11
  ## [0.6.1] - 2024-09-26
6
12
 
7
13
  ### Changed
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2022 Passage
3
+ Copyright (c) 2024 Passage by 1Password
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
data/README.md CHANGED
@@ -1,218 +1,84 @@
1
- <img src="https://storage.googleapis.com/passage-docs/passage-logo-gradient.svg" alt="Passage logo" style="width:250px;"/>
1
+ ![passage-ruby](https://storage.googleapis.com/passage-docs/github-md-assets/passage-ruby.png)
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/passageidentity.svg)](https://badge.fury.io/rb/passageidentity)
3
+ ![Gem Version](https://img.shields.io/gem/v/passageidentity)
4
+ ![GitHub License](https://img.shields.io/github/license/passageidentity/passage-ruby)
5
+ ![Static Badge](https://img.shields.io/badge/Built_by_1Password-grey?logo=1password)
4
6
 
5
- # passage-ruby
7
+ ## About
6
8
 
7
- This Ruby SDK allows for verification of server-side authentication and user management for Ruby applications build with [Passage](https://passage.id). For more information, please visit [Passage Documentation](https://docs.passage.id).
9
+ [Passage by 1Password](https://1password.com/product/passage) unlocks the passwordless future with a simpler, more secure passkey authentication experience. Passage handles the complexities of the [WebAuthn API](https://blog.1password.com/what-is-webauthn/), and allows you to implement passkeys with ease.
8
10
 
9
- Install this package using [RubyGems](https://rubygems.org/gems/passageidentity).
11
+ Use [Passkey Flex](https://docs.passage.id/flex) to add passkeys to an existing authentication experience.
10
12
 
11
- ```
12
- gem install passageidentity
13
- ```
13
+ Use [Passkey Complete](https://docs.passage.id/complete) as a standalone passwordless auth solution.
14
14
 
15
- ## Instantiating the Passage Class
15
+ Use [Passkey Ready](https://docs.passage.id/passkey-ready) to determine if your users are ready for passkeys.
16
16
 
17
- Initialize the Passage Client as follows:
18
-
19
- ```ruby
20
- PassageClient =
21
- Passage::Client.new(
22
- app_id: 'YOUR APP ID',
23
- api_key: 'YOUR APIKEY',
24
- auth_strategy: Passage::HEADER_AUTH,
25
- )
26
- ```
17
+ ### In passage-ruby
27
18
 
28
- Passage has three arguments that can be used for initialization: `app_id`, `api_key`, and `auth_strategy`.
19
+ Use passage-ruby to implement Passkey Complete into your Ruby backend to authenticate requests and manage users.
29
20
 
30
- - `app_id` is the Passage App ID that specifies which app should be authorized. It has no default value and must to be set upon initialization.
31
- - `api_key` is an API key for the Passage app, which can be generated in the 'App Settings' section of the [Passage Console](https://console.passage.id). It is an optional parameter and not required for authenticating requests. It is required to get or update user information.
32
- - `auth_strategy` defines where the Passage SDK should look for the authentication token. It is set by default to `Passage::COOKIE_AUTH`, but can be changed to `Passage::HEADER_AUTH`.
21
+ | Product | Compatible |
22
+ | --- | --- |
23
+ | ![Passkey Flex](https://storage.googleapis.com/passage-docs/github-md-assets/passage-passkey-flex-icon.png) Passkey **Flex** | ✖️ For Passkey Flex, check out the [Passkey Flex APIs](https://docs.passage.id/flex/apis)
24
+ | ![Passkey Complete](https://storage.googleapis.com/passage-docs/github-md-assets/passage-passkey-complete-icon.png) Passkey **Complete** | ✅
25
+ | ![Passkey Ready](https://storage.googleapis.com/passage-docs/github-md-assets/passage-passkey-ready-icon.png) Passkey **Ready** | ✖️ For Passkey Ready, check out [Authentikit](https://www.npmjs.com/package/@passageidentity/authentikit)
33
26
 
34
- ## Authenticating a Request
27
+ <br />
35
28
 
36
- To authenticate an HTTP request in a Rails application, you can use the Passage library in a middleware function. You need to provide Passage with your App ID in order to verify the JWTs.
29
+ ## Getting Started
37
30
 
38
- ```ruby
39
- require 'passageidentity'
40
-
41
- class ApplicationController < ActionController::Base
42
- PassageClient = Passage::Client.new(app_id: PASSAGE_APP_ID)
43
- def authorize!
44
- begin
45
- user_id = PassageClient.auth.authenticate_request(request)
46
- # user is authorized
47
- rescue Exception => e
48
- # handle exception (user is not authorized)
49
- end
50
- end
51
- end
52
- ```
53
-
54
- ## Retrieve App Info
55
-
56
- To retrieve information about an app , you should use the `get_app` method.
57
-
58
- ```ruby
59
- require 'passageidentity'
60
-
61
- PassageClient =
62
- Passage::Client.new(app_id: PASSAGE_APP_ID)
63
- app_info = PassageClient.get_app()
64
-
65
- ```
66
-
67
- ## Retrieve User Info
68
-
69
- To retrieve information about a user, you should use the `get` 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.
70
-
71
- ```ruby
72
- require 'passageidentity'
73
-
74
- class ApplicationController < ActionController::Base
75
- PassageClient =
76
- Passage::Client.new(app_id: PASSAGE_APP_ID, api_key: PASSAGE_API_KEY)
77
- def authorize!
78
- begin
79
- user_id = PassageClient.auth.authenticate_request(request)
80
- user = PassageClient.user.get(user_id: @user_id)
81
- # user is authorized
82
- rescue Exception => e
83
- # handle exception (user is not authorized)
84
- end
85
- end
86
- end
87
- ```
88
-
89
- ## Retrieve User Info By Identifier
90
-
91
- 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.
92
-
93
- ```ruby
94
- require 'passageidentity'
95
-
96
- class ApplicationController < ActionController::Base
97
- PassageClient =
98
- Passage::Client.new(app_id: PASSAGE_APP_ID, api_key: PASSAGE_API_KEY)
99
- def authorize!
100
- begin
101
- user_id = PassageClient.auth.authenticate_request(request)
102
- user = PassageClient.user.get_by_identifier(identifier: @identifier)
103
- # user is authorized
104
- rescue Exception => e
105
- # handle exception (user is not authorized)
106
- end
107
- end
108
- end
109
- ```
31
+ ### Check Prerequisites
110
32
 
111
- ## Activate/Deactivate User
33
+ <p>
34
+ You'll need a free Passage account and a Passkey Complete app set up in <a href="https://console.passage.id/">Passage Console</a> to get started. <br />
35
+ <sub><a href="https://docs.passage.id/home#passage-console">Learn more about Passage Console →</a></sub>
36
+ </p>
112
37
 
113
- You can activate or deactivate a user using the Passage SDK. These actions require an API Key and deactivating a user will prevent them from logging into your application
114
- with Passage.
38
+ ### Install
115
39
 
116
- ```ruby
117
- require 'passageidentity'
118
-
119
- PassageClient =
120
- Passage::Client.new(app_id: PASSAGE_APP_ID, api_key: PASSAGE_API_KEY)
121
-
122
- user = PassageClient.user.deactivate(user_id: user_id)
123
- user = PassageClient.user.activate(user_id: user_id)
124
- ```
125
-
126
- ## Create User
127
-
128
- You can create users using their email address or phone number. Note that their phone number must be in E164 format (example shown below).
129
-
130
- ```ruby
131
- require 'passageidentity'
132
-
133
- PassageClient =
134
- Passage::Client.new(app_id: PASSAGE_APP_ID, api_key: PASSAGE_API_KEY)
135
-
136
- user = PassageClient.user.create(email: 'exampleEmail@domain.com')
137
- user = PassageClient.user.create(phone: '+15005550007')
40
+ ```shell
41
+ gem install passageidentity
138
42
  ```
139
43
 
140
- ## Delete User
141
-
142
- You can delete a user using the Passage SDK.
44
+ ### Import
143
45
 
144
46
  ```ruby
145
47
  require 'passageidentity'
146
-
147
- PassageClient =
148
- Passage::Client.new(app_id: PASSAGE_APP_ID, api_key: PASSAGE_API_KEY)
149
-
150
- success = PassageClient.user.delete(user_id: user_id)
151
- puts 'passage user was successfully deleted' if success
152
48
  ```
153
49
 
154
- ## List User Devices
155
-
156
- You can list the devices associated with a particular Passage User.
50
+ ### Initialize
157
51
 
158
52
  ```ruby
159
- require 'passageidentity'
160
-
161
53
  PassageClient =
162
- Passage::Client.new(app_id: PASSAGE_APP_ID, api_key: PASSAGE_API_KEY)
163
-
164
- devices = PassageClient.user.list_devices(user_id: user_id)
54
+ Passage::Client.new(
55
+ app_id: 'YOUR_PASSAGE_APP_ID',
56
+ api_key: 'YOUR_PASSAGE_API_KEY',
57
+ auth_strategy: Passage::HEADER_AUTH,
58
+ )
165
59
  ```
166
60
 
167
- ## List User Devices
168
-
169
- You can list the devices associated with a particular Passage User.
61
+ ### Go Passwordless
170
62
 
171
- ```ruby
172
- require 'passageidentity'
63
+ Find all core functions, user management details, and more implementation guidance on our [Passkey Complete Ruby Documentation](https://docs.passage.id/complete/backend-sdks/ruby) page.
173
64
 
174
- PassageClient = Passage::Client.new(app_id: PASSAGE_APP_ID, api_key: PASSAGE_API_KEY)
65
+ ## Support & Feedback
175
66
 
176
- success = PassageClient.user.delete_device(user_id: user_id, device_id)
177
- if success
178
- puts "passage user device was successfully deleted"
179
- end
180
- ```
67
+ We are here to help! Find additional docs, the best ways to get in touch with our team, and more within our [support resources](https://github.com/passageidentity/.github/blob/main/SUPPORT.md).
181
68
 
182
- ## Create an Embeddable Magic Link
69
+ <br />
183
70
 
184
- To create a magic link, you should use the `create_magic_link` method. You can check out our guide on embeddable magic links in our [docs](https://docs.passage.id/complete/magic-links).
71
+ ---
185
72
 
186
- ```ruby
187
- require 'passageidentity'
188
-
189
- PassageClient =
190
- Passage::Client.new(app_id: PASSAGE_APP_ID, api_key: PASSAGE_API_KEY)
191
-
192
- magic_link = PassageClient.create_magic_link(user_id: user_id)
193
- magic_link =
194
- PassageClient.create_magic_link(
195
- email: 'example@domain.com',
196
- send: true,
197
- channel: Passage::EMAIL_CHANNEL,
198
- ttl: 120,
199
- )
200
- ```
73
+ <p align="center">
74
+ <picture>
75
+ <source media="(prefers-color-scheme: dark)" srcset="https://storage.googleapis.com/passage-docs/github-md-assets/passage-by-1password-dark.png">
76
+ <source media="(prefers-color-scheme: light)" srcset="https://storage.googleapis.com/passage-docs/github-md-assets/passage-by-1password-light.png">
77
+ <img alt="Passage by 1Password Logo" src="https://storage.googleapis.com/passage-docs/github-md-assets/passage-by-1password-light.png">
78
+ </picture>
79
+ </p>
201
80
 
202
- ## Available Functions
203
-
204
- | Class | Method | Description |
205
- | ----------- | ---------------------------------------------------------------------------- | ---------------------------- |
206
- | _ClientApi_ | [**get_app**](docs/custom/ClientApi.md#get_app) | Get App |
207
- | _ClientApi_ | [**create_magic_link**](docs/custom/Passage/ClientApi.md#create_magic_link) | Create Embeddable Magic Link |
208
- | _AuthApi_ | [**auth.authenticate_request**](docs/custom/AuthApi.md#authenticate_request) | Validates user jwt token |
209
- | _AuthApi_ | [**auth.validate_jwt**](docs/custom/AuthApi.md#validate_jwt) | Validates user jwt token |
210
- | _UserAPI_ | [**user.delete_device**](docs/custom/UserApi.md#delete_device) | Delete a device for a user |
211
- | _UserAPI_ | [**user.list_devices**](docs/custom/UserApi.md#list_devices) | List User Devices |
212
- | _UserAPI_ | [**user.activate**](docs/custom/UserApi.md#activate) | Activate User |
213
- | _UserAPI_ | [**user.create**](docs/custom/UserApi.md#create) | Create User |
214
- | _UserAPI_ | [**user.deactivate**](docs/custom/UserApi.md#deactivate) | Deactivate User |
215
- | _UserAPI_ | [**user.delete**](docs/custom/UserApi.md#delete) | Delete User |
216
- | _UserAPI_ | [**user.get**](docs/custom/UserApi.md#get) | Get User |
217
- | _UserAPI_ | [**user.update**](docs/custom/UserApi.md#update) | Update User |
218
- | _UserAPI_ | [**user.signout**](docs/custom/UserApi.md#signout) | Signout User |
81
+ <p align="center">
82
+ <sub>Passage is a product by <a href="https://1password.com/product/passage">1Password</a>, the global leader in access management solutions with nearly 150k business customers.</sub><br />
83
+ <sub>This project is licensed under the MIT license. See the <a href="LICENSE">LICENSE</a> file for more info.</sub>
84
+ </p>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Passage
4
- VERSION = '0.6.1'
4
+ VERSION = '0.6.2'
5
5
  end
@@ -3,13 +3,13 @@ require_relative 'lib/passageidentity/version'
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'passageidentity'
5
5
  s.version = Passage::VERSION
6
- s.summary = 'Passage SDK for biometric authentication'
6
+ s.summary = 'Passage Passkey Complete SDK'
7
7
  s.description =
8
- 'Enables verification of server-side authentication and user management for applications using Passage'
9
- s.authors = ['Passage Identity']
8
+ 'Passkey Complete for Ruby - Integrate into your Ruby API or service to enable a completely passwordless standalone auth solution with Passage by 1Password.'
9
+ s.authors = ['Passage by 1Password']
10
10
  s.email = 'support@passage.id'
11
11
  s.files = ['lib/passageidentity.rb']
12
- s.homepage = 'https://rubygems.org/gems/passageidentity'
12
+ s.homepage = 'http://docs.passage.id/complete'
13
13
  s.license = 'MIT'
14
14
 
15
15
  s.metadata['source_code_uri'] =
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passageidentity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
- - Passage Identity
7
+ - Passage by 1Password
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-26 00:00:00.000000000 Z
11
+ date: 2024-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -70,8 +70,8 @@ dependencies:
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
72
  version: 3.0.0
73
- description: Enables verification of server-side authentication and user management
74
- for applications using Passage
73
+ description: Passkey Complete for Ruby - Integrate into your Ruby API or service to
74
+ enable a completely passwordless standalone auth solution with Passage by 1Password.
75
75
  email: support@passage.id
76
76
  executables: []
77
77
  extensions: []
@@ -210,7 +210,7 @@ files:
210
210
  - tests/errors_test.rb
211
211
  - tests/magic_link_test.rb
212
212
  - tests/user_api_test.rb
213
- homepage: https://rubygems.org/gems/passageidentity
213
+ homepage: http://docs.passage.id/complete
214
214
  licenses:
215
215
  - MIT
216
216
  metadata:
@@ -233,5 +233,5 @@ requirements: []
233
233
  rubygems_version: 3.2.33
234
234
  signing_key:
235
235
  specification_version: 4
236
- summary: Passage SDK for biometric authentication
236
+ summary: Passage Passkey Complete SDK
237
237
  test_files: []