passageidentity 0.6.2 → 0.7.0

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.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/lib/openapi_client/api/apps_api.rb +2 -2
  3. data/lib/openapi_client/api/magic_links_api.rb +4 -4
  4. data/lib/openapi_client/api/tokens_api.rb +2 -2
  5. data/lib/openapi_client/api/user_devices_api.rb +3 -3
  6. data/lib/openapi_client/api/users_api.rb +8 -8
  7. data/lib/openapi_client/api_client.rb +36 -30
  8. data/lib/openapi_client/api_error.rb +1 -1
  9. data/lib/openapi_client/configuration.rb +11 -1
  10. data/lib/openapi_client/models/app_info.rb +36 -3
  11. data/lib/openapi_client/models/app_response.rb +1 -1
  12. data/lib/openapi_client/models/apple_user_social_connection.rb +1 -1
  13. data/lib/openapi_client/models/auth_methods.rb +1 -1
  14. data/lib/openapi_client/models/create_magic_link_request.rb +2 -57
  15. data/lib/openapi_client/models/create_user_request.rb +1 -1
  16. data/lib/openapi_client/models/element_customization.rb +1 -1
  17. data/lib/openapi_client/models/font_family.rb +1 -1
  18. data/lib/openapi_client/models/github_user_social_connection.rb +1 -1
  19. data/lib/openapi_client/models/google_user_social_connection.rb +1 -1
  20. data/lib/openapi_client/models/layout_config.rb +1 -1
  21. data/lib/openapi_client/models/layouts.rb +1 -1
  22. data/lib/openapi_client/models/link.rb +1 -1
  23. data/lib/openapi_client/models/list_devices_response.rb +1 -1
  24. data/lib/openapi_client/models/list_paginated_users_item.rb +19 -2
  25. data/lib/openapi_client/models/list_paginated_users_response.rb +1 -1
  26. data/lib/openapi_client/models/magic_link.rb +1 -1
  27. data/lib/openapi_client/models/magic_link_auth_method.rb +1 -1
  28. data/lib/openapi_client/models/magic_link_channel.rb +1 -1
  29. data/lib/openapi_client/models/magic_link_response.rb +1 -1
  30. data/lib/openapi_client/models/magic_link_type.rb +1 -1
  31. data/lib/openapi_client/models/model400_error.rb +1 -1
  32. data/lib/openapi_client/models/model401_error.rb +1 -1
  33. data/lib/openapi_client/models/model403_error.rb +1 -1
  34. data/lib/openapi_client/models/model404_error.rb +3 -3
  35. data/lib/openapi_client/models/model500_error.rb +1 -1
  36. data/lib/openapi_client/models/nonce.rb +1 -1
  37. data/lib/openapi_client/models/otp_auth_method.rb +1 -1
  38. data/lib/openapi_client/models/paginated_links.rb +1 -1
  39. data/lib/openapi_client/models/passkeys_auth_method.rb +1 -1
  40. data/lib/openapi_client/models/social_connection_type.rb +41 -0
  41. data/lib/openapi_client/models/technologies.rb +1 -1
  42. data/lib/openapi_client/models/theme_type.rb +41 -0
  43. data/lib/openapi_client/models/ttl_display_unit.rb +1 -1
  44. data/lib/openapi_client/models/update_user_request.rb +1 -1
  45. data/lib/openapi_client/models/user_event_action.rb +41 -0
  46. data/lib/openapi_client/models/user_event_status.rb +1 -1
  47. data/lib/openapi_client/models/user_info.rb +19 -2
  48. data/lib/openapi_client/models/user_metadata_field.rb +1 -1
  49. data/lib/openapi_client/models/user_metadata_field_type.rb +1 -1
  50. data/lib/openapi_client/models/user_recent_event.rb +51 -5
  51. data/lib/openapi_client/models/user_response.rb +1 -1
  52. data/lib/openapi_client/models/user_social_connections.rb +1 -1
  53. data/lib/openapi_client/models/user_status.rb +1 -1
  54. data/lib/openapi_client/models/web_authn_devices.rb +1 -1
  55. data/lib/openapi_client/models/web_authn_icons.rb +1 -1
  56. data/lib/openapi_client/models/web_authn_type.rb +1 -1
  57. data/lib/openapi_client/version.rb +1 -1
  58. data/lib/openapi_client.rb +4 -4
  59. data/lib/passageidentity/auth.rb +205 -104
  60. data/lib/passageidentity/client.rb +71 -59
  61. data/lib/passageidentity/error.rb +42 -16
  62. data/lib/passageidentity/user_api.rb +120 -161
  63. data/lib/passageidentity/version.rb +1 -1
  64. data/lib/passageidentity.rb +6 -2
  65. metadata +33 -79
  66. data/.github/workflows/deploy.yml +0 -30
  67. data/.github/workflows/on-pull-request.yml +0 -33
  68. data/.gitignore +0 -58
  69. data/CHANGELOG.md +0 -57
  70. data/CONTRIBUTING.md +0 -66
  71. data/Gemfile +0 -13
  72. data/LICENSE +0 -21
  73. data/README.md +0 -84
  74. data/docs/custom/AuthApi.md +0 -141
  75. data/docs/custom/ClientApi.md +0 -107
  76. data/docs/custom/UserApi.md +0 -419
  77. data/docs/generated/AppInfo.md +0 -94
  78. data/docs/generated/AppResponse.md +0 -18
  79. data/docs/generated/AppleUserSocialConnection.md +0 -24
  80. data/docs/generated/AppsApi.md +0 -77
  81. data/docs/generated/AuthMethods.md +0 -22
  82. data/docs/generated/CreateMagicLinkRequest.md +0 -36
  83. data/docs/generated/CreateUserRequest.md +0 -22
  84. data/docs/generated/ElementCustomization.md +0 -56
  85. data/docs/generated/FontFamily.md +0 -15
  86. data/docs/generated/GithubUserSocialConnection.md +0 -24
  87. data/docs/generated/GoogleUserSocialConnection.md +0 -24
  88. data/docs/generated/LayoutConfig.md +0 -26
  89. data/docs/generated/Layouts.md +0 -20
  90. data/docs/generated/Link.md +0 -18
  91. data/docs/generated/ListDevicesResponse.md +0 -18
  92. data/docs/generated/ListPaginatedUsersItem.md +0 -38
  93. data/docs/generated/ListPaginatedUsersResponse.md +0 -28
  94. data/docs/generated/MagicLink.md +0 -36
  95. data/docs/generated/MagicLinkAuthMethod.md +0 -22
  96. data/docs/generated/MagicLinkChannel.md +0 -15
  97. data/docs/generated/MagicLinkResponse.md +0 -18
  98. data/docs/generated/MagicLinkType.md +0 -15
  99. data/docs/generated/MagicLinksApi.md +0 -79
  100. data/docs/generated/Model400Error.md +0 -20
  101. data/docs/generated/Model401Error.md +0 -20
  102. data/docs/generated/Model403Error.md +0 -20
  103. data/docs/generated/Model404Error.md +0 -20
  104. data/docs/generated/Model500Error.md +0 -20
  105. data/docs/generated/Nonce.md +0 -18
  106. data/docs/generated/OtpAuthMethod.md +0 -22
  107. data/docs/generated/PaginatedLinks.md +0 -26
  108. data/docs/generated/PasskeysAuthMethod.md +0 -18
  109. data/docs/generated/README.md +0 -158
  110. data/docs/generated/Technologies.md +0 -15
  111. data/docs/generated/TokensApi.md +0 -78
  112. data/docs/generated/TtlDisplayUnit.md +0 -15
  113. data/docs/generated/UpdateUserRequest.md +0 -22
  114. data/docs/generated/UserDevicesApi.md +0 -152
  115. data/docs/generated/UserEventStatus.md +0 -15
  116. data/docs/generated/UserInfo.md +0 -48
  117. data/docs/generated/UserMetadataField.md +0 -28
  118. data/docs/generated/UserMetadataFieldType.md +0 -15
  119. data/docs/generated/UserRecentEvent.md +0 -30
  120. data/docs/generated/UserResponse.md +0 -18
  121. data/docs/generated/UserSocialConnections.md +0 -22
  122. data/docs/generated/UserStatus.md +0 -15
  123. data/docs/generated/UsersApi.md +0 -534
  124. data/docs/generated/WebAuthnDevices.md +0 -34
  125. data/docs/generated/WebAuthnIcons.md +0 -20
  126. data/docs/generated/WebAuthnType.md +0 -15
  127. data/generate.sh +0 -31
  128. data/openapitools.json +0 -7
  129. data/passageidentity.gemspec +0 -32
  130. data/tests/all.rb +0 -3
  131. data/tests/app_test.rb +0 -15
  132. data/tests/auth_test.rb +0 -74
  133. data/tests/errors_test.rb +0 -30
  134. data/tests/magic_link_test.rb +0 -22
  135. data/tests/user_api_test.rb +0 -121
metadata CHANGED
@@ -1,15 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: passageidentity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Passage by 1Password
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-23 00:00:00.000000000 Z
11
+ date: 2024-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '7.2'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: '7.0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '7.2'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: '7.0'
13
33
  - !ruby/object:Gem::Dependency
14
34
  name: faraday
15
35
  requirement: !ruby/object:Gem::Requirement
@@ -51,25 +71,25 @@ dependencies:
51
71
  - !ruby/object:Gem::Version
52
72
  version: 2.3.0
53
73
  - !ruby/object:Gem::Dependency
54
- name: openssl
74
+ name: marcel
55
75
  requirement: !ruby/object:Gem::Requirement
56
76
  requirements:
57
77
  - - "~>"
58
78
  - !ruby/object:Gem::Version
59
- version: '3.0'
79
+ version: '1.0'
60
80
  - - ">="
61
81
  - !ruby/object:Gem::Version
62
- version: 3.0.0
82
+ version: 1.0.4
63
83
  type: :runtime
64
84
  prerelease: false
65
85
  version_requirements: !ruby/object:Gem::Requirement
66
86
  requirements:
67
87
  - - "~>"
68
88
  - !ruby/object:Gem::Version
69
- version: '3.0'
89
+ version: '1.0'
70
90
  - - ">="
71
91
  - !ruby/object:Gem::Version
72
- version: 3.0.0
92
+ version: 1.0.4
73
93
  description: Passkey Complete for Ruby - Integrate into your Ruby API or service to
74
94
  enable a completely passwordless standalone auth solution with Passage by 1Password.
75
95
  email: support@passage.id
@@ -77,68 +97,6 @@ executables: []
77
97
  extensions: []
78
98
  extra_rdoc_files: []
79
99
  files:
80
- - ".github/workflows/deploy.yml"
81
- - ".github/workflows/on-pull-request.yml"
82
- - ".gitignore"
83
- - CHANGELOG.md
84
- - CONTRIBUTING.md
85
- - Gemfile
86
- - LICENSE
87
- - README.md
88
- - docs/custom/AuthApi.md
89
- - docs/custom/ClientApi.md
90
- - docs/custom/UserApi.md
91
- - docs/generated/AppInfo.md
92
- - docs/generated/AppResponse.md
93
- - docs/generated/AppleUserSocialConnection.md
94
- - docs/generated/AppsApi.md
95
- - docs/generated/AuthMethods.md
96
- - docs/generated/CreateMagicLinkRequest.md
97
- - docs/generated/CreateUserRequest.md
98
- - docs/generated/ElementCustomization.md
99
- - docs/generated/FontFamily.md
100
- - docs/generated/GithubUserSocialConnection.md
101
- - docs/generated/GoogleUserSocialConnection.md
102
- - docs/generated/LayoutConfig.md
103
- - docs/generated/Layouts.md
104
- - docs/generated/Link.md
105
- - docs/generated/ListDevicesResponse.md
106
- - docs/generated/ListPaginatedUsersItem.md
107
- - docs/generated/ListPaginatedUsersResponse.md
108
- - docs/generated/MagicLink.md
109
- - docs/generated/MagicLinkAuthMethod.md
110
- - docs/generated/MagicLinkChannel.md
111
- - docs/generated/MagicLinkResponse.md
112
- - docs/generated/MagicLinkType.md
113
- - docs/generated/MagicLinksApi.md
114
- - docs/generated/Model400Error.md
115
- - docs/generated/Model401Error.md
116
- - docs/generated/Model403Error.md
117
- - docs/generated/Model404Error.md
118
- - docs/generated/Model500Error.md
119
- - docs/generated/Nonce.md
120
- - docs/generated/OtpAuthMethod.md
121
- - docs/generated/PaginatedLinks.md
122
- - docs/generated/PasskeysAuthMethod.md
123
- - docs/generated/README.md
124
- - docs/generated/Technologies.md
125
- - docs/generated/TokensApi.md
126
- - docs/generated/TtlDisplayUnit.md
127
- - docs/generated/UpdateUserRequest.md
128
- - docs/generated/UserDevicesApi.md
129
- - docs/generated/UserEventStatus.md
130
- - docs/generated/UserInfo.md
131
- - docs/generated/UserMetadataField.md
132
- - docs/generated/UserMetadataFieldType.md
133
- - docs/generated/UserRecentEvent.md
134
- - docs/generated/UserResponse.md
135
- - docs/generated/UserSocialConnections.md
136
- - docs/generated/UserStatus.md
137
- - docs/generated/UsersApi.md
138
- - docs/generated/WebAuthnDevices.md
139
- - docs/generated/WebAuthnIcons.md
140
- - docs/generated/WebAuthnType.md
141
- - generate.sh
142
100
  - lib/models/update_magic_link_auth_method.rb
143
101
  - lib/models/update_otp_auth_method.rb
144
102
  - lib/models/update_passkeys_auth_method.rb
@@ -181,9 +139,12 @@ files:
181
139
  - lib/openapi_client/models/otp_auth_method.rb
182
140
  - lib/openapi_client/models/paginated_links.rb
183
141
  - lib/openapi_client/models/passkeys_auth_method.rb
142
+ - lib/openapi_client/models/social_connection_type.rb
184
143
  - lib/openapi_client/models/technologies.rb
144
+ - lib/openapi_client/models/theme_type.rb
185
145
  - lib/openapi_client/models/ttl_display_unit.rb
186
146
  - lib/openapi_client/models/update_user_request.rb
147
+ - lib/openapi_client/models/user_event_action.rb
187
148
  - lib/openapi_client/models/user_event_status.rb
188
149
  - lib/openapi_client/models/user_info.rb
189
150
  - lib/openapi_client/models/user_metadata_field.rb
@@ -202,19 +163,12 @@ files:
202
163
  - lib/passageidentity/error.rb
203
164
  - lib/passageidentity/user_api.rb
204
165
  - lib/passageidentity/version.rb
205
- - openapitools.json
206
- - passageidentity.gemspec
207
- - tests/all.rb
208
- - tests/app_test.rb
209
- - tests/auth_test.rb
210
- - tests/errors_test.rb
211
- - tests/magic_link_test.rb
212
- - tests/user_api_test.rb
213
166
  homepage: http://docs.passage.id/complete
214
167
  licenses:
215
168
  - MIT
216
169
  metadata:
217
170
  source_code_uri: https://github.com/passageidentity/passage-ruby
171
+ changelog_uri: https://github.com/passageidentity/passage-ruby/CHANGELOG.md
218
172
  post_install_message:
219
173
  rdoc_options: []
220
174
  require_paths:
@@ -223,14 +177,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
223
177
  requirements:
224
178
  - - ">="
225
179
  - !ruby/object:Gem::Version
226
- version: '0'
180
+ version: 3.1.3
227
181
  required_rubygems_version: !ruby/object:Gem::Requirement
228
182
  requirements:
229
183
  - - ">="
230
184
  - !ruby/object:Gem::Version
231
185
  version: '0'
232
186
  requirements: []
233
- rubygems_version: 3.2.33
187
+ rubygems_version: 3.5.23
234
188
  signing_key:
235
189
  specification_version: 4
236
190
  summary: Passage Passkey Complete SDK
@@ -1,30 +0,0 @@
1
- name: Deploy Ruby Gem
2
-
3
- on:
4
- push:
5
- branches: [main]
6
-
7
- jobs:
8
- build:
9
- name: Build + Publish
10
- runs-on: ubuntu-latest
11
- permissions:
12
- contents: read
13
- packages: write
14
-
15
- steps:
16
- - uses: actions/checkout@v2
17
- - uses: ruby/setup-ruby@v1
18
- with:
19
- ruby-version: '3.0'
20
-
21
- - name: Publish to RubyGems
22
- run: |
23
- mkdir -p $HOME/.gem
24
- touch $HOME/.gem/credentials
25
- chmod 0600 $HOME/.gem/credentials
26
- printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
27
- gem build *.gemspec
28
- gem push *.gem
29
- env:
30
- GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
@@ -1,33 +0,0 @@
1
- name: PR Checks
2
-
3
- on:
4
- workflow_dispatch:
5
- pull_request:
6
- branches:
7
- - main
8
-
9
- env:
10
- API_KEY: ${{ secrets.API_KEY }}
11
- APP_ID: ${{ secrets.APP_ID }}
12
- PSG_JWT: ${{ secrets.PSG_JWT }}
13
- TEST_USER_ID: ${{ secrets.TEST_USER_ID }}
14
-
15
- jobs:
16
- build:
17
- name: Test and Lint
18
- runs-on: ubuntu-latest
19
-
20
- steps:
21
- - uses: actions/checkout@v2
22
- - uses: ruby/setup-ruby@v1
23
- with:
24
- ruby-version: '3.1'
25
-
26
- - name: Run Tests
27
- run: |
28
- bundle install
29
- ruby tests/all.rb
30
- - name: Run Linting
31
- run: |
32
- npm install -g prettier @prettier/plugin-ruby
33
- prettier --check '**/*.rb'
data/.gitignore DELETED
@@ -1,58 +0,0 @@
1
- *.gem
2
- *.rbc
3
- /.config
4
- /coverage/
5
- /InstalledFiles
6
- /pkg/
7
- /spec/reports/
8
- /spec/examples.txt
9
- /test/tmp/
10
- /test/version_tmp/
11
- /tmp/
12
-
13
- .env
14
- # Used by dotenv library to load environment variables.
15
- # .env
16
-
17
- # Ignore Byebug command history file.
18
- .byebug_history
19
-
20
- ## Specific to RubyMotion:
21
- .dat*
22
- .repl_history
23
- build/
24
- *.bridgesupport
25
- build-iPhoneOS/
26
- build-iPhoneSimulator/
27
-
28
- ## Specific to RubyMotion (use of CocoaPods):
29
- #
30
- # We recommend against adding the Pods directory to your .gitignore. However
31
- # you should judge for yourself, the pros and cons are mentioned at:
32
- # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
33
- #
34
- # vendor/Pods/
35
-
36
- ## Documentation cache and generated files:
37
- /.yardoc/
38
- /_yardoc/
39
- /doc/
40
- /rdoc/
41
-
42
- ## Environment normalization:
43
- /.bundle/
44
- /vendor/bundle
45
- /lib/bundler/man/
46
-
47
- # for a library or gem, you might want to ignore these files since the code is
48
- # intended to run in multiple environments; otherwise, check them in:
49
- # Gemfile.lock
50
- # .ruby-version
51
- # .ruby-gemset
52
-
53
- # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
54
- .rvmrc
55
-
56
- # Used by RuboCop. Remote config files pulled in from inherit_from directive.
57
- # .rubocop-https?--*
58
- Gemfile.lock
data/CHANGELOG.md DELETED
@@ -1,57 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
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
-
11
- ## [0.6.1] - 2024-09-26
12
-
13
- ### Changed
14
-
15
- - Updated documentation links to point to new documentation
16
-
17
- ## [0.6.0] - 2024-03-21
18
-
19
- ### Added
20
-
21
- - `GetUserByIdentifier` method has been added
22
- - `ListPaginatedUsersItem` model has been added
23
-
24
- ## [0.5.0] - 2024-01-30
25
-
26
- ### Added
27
-
28
- - `AppleUserSocialConnection` model has been added
29
-
30
- ### Changed
31
-
32
- - `UserEventInfo` has been renamed to `UserRecentEvent`
33
- - Docs have been moved to `/docs`
34
- - `GithubSocialConnection` has been renamed to `GithubUserSocialConnection`
35
- - `GoogleSocialConnection` has been renamed to `GoogleUserSocialConnection`
36
-
37
- ## [0.4.0] - 2024-01-18
38
-
39
- ### Added
40
-
41
- - The `UserInfo` class has a new `'social_connections' =>:'UserSocialConnections'` field for GitHub and Google
42
-
43
- ## [0.3.0] - 2023-12-06
44
-
45
- ### Added
46
-
47
- - Generate types and api calls with openapi generator.
48
- - Version constant instead of parsing gemspec.
49
-
50
- ### Deprecate
51
-
52
- - `user.signout()` -> `auth.revoke_user_refresh_tokens()`
53
- - `auth.authenticate_request()` -> `auth.validate_jwt()`
54
-
55
- ### Possible Breaking Changes
56
-
57
- - Types are now generated. Previous type names may have changed. [See documentation](https://github.com/passageidentity/passage-ruby/tree/main/docs/generated) for model definitions.
data/CONTRIBUTING.md DELETED
@@ -1,66 +0,0 @@
1
- # Ruby SDK for Passage
2
-
3
- ## Testing the gem locally
4
-
5
- Install the gem
6
-
7
- ```
8
- gem build passageidentity.gemspec -o {$FILE_NAME}.gem
9
- gem install ./{$FILE_NAME}.gem
10
- ```
11
-
12
- Test it out:
13
-
14
- ```
15
- irb -Ilib -rpassageidentity
16
- >> passage = Passage::Client.new(app_id: 'YOUR_APP_ID')
17
- >> passage.auth.authenticate("JWT_HERE")
18
- <passage_user_id>
19
- ```
20
-
21
- Run Tests:
22
-
23
- ```
24
- # all tests
25
- ruby tests/all.rb
26
- # individual test files
27
- ruby tests/*_test.rb
28
- ```
29
-
30
- Run Linter:
31
-
32
- ```
33
- npm install -g prettier @prettier/plugin-ruby
34
- gem install bundler prettier_print syntax_tree syntax_tree-haml syntax_tree-rbs
35
- prettier --write '**/*.rb'
36
- ```
37
-
38
-
39
- To test in the example app, change the Gemfile to include this path:
40
-
41
- ```
42
- gem "passageidentity", path: "../../passage-ruby"
43
- ```
44
-
45
- ## Publishing
46
-
47
- Create an account in rubygems.org then run the following command with your username.
48
-
49
- ```
50
- $ curl -u <username> https://rubygems.org/api/v1/api_key.yaml >
51
- ~/.gem/credentials; chmod 0600 ~/.gem/credentials
52
-
53
- Enter host password for user '<username>':
54
- ```
55
-
56
- ```
57
- gem push passage-0.0.0.gem
58
- ```
59
-
60
- You can check for the gem here:
61
-
62
- ```
63
- gem list -r passage
64
- ```
65
-
66
- ```
data/Gemfile DELETED
@@ -1,13 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in passageidentity.gemspec
4
- gemspec
5
-
6
- group :development do
7
- gem 'rack'
8
- gem 'dotenv'
9
- gem 'prettier_print'
10
- gem 'syntax_tree'
11
- gem 'syntax_tree-haml'
12
- gem 'syntax_tree-rbs'
13
- end
data/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Passage by 1Password
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
data/README.md DELETED
@@ -1,84 +0,0 @@
1
- ![passage-ruby](https://storage.googleapis.com/passage-docs/github-md-assets/passage-ruby.png)
2
-
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)
6
-
7
- ## About
8
-
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.
10
-
11
- Use [Passkey Flex](https://docs.passage.id/flex) to add passkeys to an existing authentication experience.
12
-
13
- Use [Passkey Complete](https://docs.passage.id/complete) as a standalone passwordless auth solution.
14
-
15
- Use [Passkey Ready](https://docs.passage.id/passkey-ready) to determine if your users are ready for passkeys.
16
-
17
- ### In passage-ruby
18
-
19
- Use passage-ruby to implement Passkey Complete into your Ruby backend to authenticate requests and manage users.
20
-
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)
26
-
27
- <br />
28
-
29
- ## Getting Started
30
-
31
- ### Check Prerequisites
32
-
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>
37
-
38
- ### Install
39
-
40
- ```shell
41
- gem install passageidentity
42
- ```
43
-
44
- ### Import
45
-
46
- ```ruby
47
- require 'passageidentity'
48
- ```
49
-
50
- ### Initialize
51
-
52
- ```ruby
53
- PassageClient =
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
- )
59
- ```
60
-
61
- ### Go Passwordless
62
-
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.
64
-
65
- ## Support & Feedback
66
-
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).
68
-
69
- <br />
70
-
71
- ---
72
-
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>
80
-
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,141 +0,0 @@
1
- # Passage::AuthApi
2
-
3
- All URIs are relative to *https://api.passage.id/v1*
4
-
5
- | Method | Description |
6
- | ------ | ----------- |
7
- | [**authenticate_request**](AuthApi.md#authenticate_request) | **Deprecated:** Revokes refresh tokens |
8
- | [**revoke_user_refresh_tokens**](AuthApi.md#revoke_user_refresh_tokens) | Revokes user tokens |
9
- | [**validate_jwt**](AuthApi.md#validate_jwt) | Validates jwt token
10
-
11
-
12
- ---
13
-
14
- ## authenticate_request (deprecated)
15
-
16
- > authenticate_request(request)
17
-
18
- Validates that request has the correct jwt token
19
-
20
-
21
- ### Examples
22
-
23
- ```ruby
24
- require 'passageidentity'
25
-
26
- class ApplicationController < ActionController::Base
27
- PassageClient = Passage::Client.new(app_id: PASSAGE_APP_ID, api_key: PASSAGE_API_KEY)
28
-
29
- def authorize!
30
- begin
31
- request.to_hash()
32
- @user_id = Passage.auth.authenticate_request(request)
33
- session[:psg_user_id] = @user_id
34
- rescue Exception => e
35
- # unauthorized
36
- redirect_to "/unauthorized"
37
- end
38
- end
39
- end
40
- ```
41
-
42
- ### Parameters
43
-
44
- | Name | Type | Description | Notes |
45
- | ---- | ---- | ----------- | ----- |
46
- | **request** | **RequestObject** | request | |
47
-
48
- ### Return type
49
-
50
- [**UserInfo**](UserInfo.md)
51
-
52
- ### Authorization
53
-
54
- [bearerAuth](../README.md#bearerAuth)
55
-
56
-
57
- ---
58
-
59
- ## revoke_user_refresh_tokens()
60
-
61
- > revoke_user_refresh_tokens(user_id)
62
-
63
- Revokes user tokens
64
-
65
- ### Examples
66
-
67
- ```ruby
68
- require 'passageidentity'
69
-
70
- class ApplicationController < ActionController::Base
71
- PassageClient = Passage::Client.new(app_id: PASSAGE_APP_ID, api_key: PASSAGE_API_KEY)
72
-
73
- def authorize!
74
- begin
75
- revoke = PassageClient.auth.revoke_user_refresh_tokens(USER_ID)
76
- rescue Exception => e
77
- # handle exception (user is not authorized)
78
- # unauthorized
79
- redirect_to "/unauthorized"
80
- end
81
- end
82
- end
83
- ```
84
-
85
- ### Parameters
86
-
87
- | Name | Type | Description | Notes |
88
- | ---- | ---- | ----------- | ----- |
89
- | **user_id** | **string** | user id | |
90
-
91
- ### Return type
92
-
93
- boolean
94
-
95
- ### Authorization
96
-
97
- [bearerAuth](../README.md#bearerAuth)
98
-
99
-
100
-
101
- ---
102
-
103
- ## validate_jwt
104
-
105
- > validate_jwt(token)
106
-
107
- Validates jwt token for a user
108
-
109
- ### Examples
110
-
111
- ```ruby
112
- require 'passageidentity'
113
-
114
- class ApplicationController < ActionController::Base
115
- PassageClient = Passage::Client.new(app_id: PASSAGE_APP_ID, api_key: PASSAGE_API_KEY)
116
-
117
- def validate_passage_user!
118
- begin
119
- # tokens are revoked
120
- revoke = PassageClient.auth.validate_jwt(token)
121
- rescue Exception => e
122
- # handle exception (user is not authorized)
123
- end
124
- end
125
- end
126
- ```
127
-
128
- ### Parameters
129
-
130
- | Name | Type | Description | Notes |
131
- | ---- | ---- | ----------- | ----- |
132
- | **token** | **String** | jwt token | |
133
-
134
- ### Return type
135
-
136
- [**UserInfo**](UserInfo.md)
137
-
138
- ### Authorization
139
-
140
- [bearerAuth](../README.md#bearerAuth)
141
-