authproto 0.3.0.beta4 → 0.3.0.beta5
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 +4 -4
- data/CHANGELOG.md +21 -0
- data/README.md +474 -311
- data/examples/basic_webapp/Gemfile +14 -0
- data/examples/{confidential_client → basic_webapp}/Gemfile.lock +1 -1
- data/examples/basic_webapp/README.md +300 -0
- data/examples/basic_webapp/app.rb +351 -0
- data/examples/basic_webapp/config/oauth-client-metadata.localhost.json +11 -0
- data/examples/basic_webapp/public/styles.css +346 -0
- data/examples/basic_webapp/scripts/generate_keys.rb +35 -0
- data/examples/basic_webapp/views/authorized.erb +48 -0
- data/examples/basic_webapp/views/index.erb +48 -0
- data/examples/{confidential_client → basic_webapp}/views/layout.erb +2 -2
- data/examples/bookmarks/Gemfile +16 -0
- data/examples/bookmarks/Gemfile.lock +158 -0
- data/examples/bookmarks/README.md +170 -0
- data/examples/bookmarks/Rakefile +23 -0
- data/examples/bookmarks/app/account.rb +16 -0
- data/examples/bookmarks/app/bookmark.rb +89 -0
- data/examples/bookmarks/app/init.rb +26 -0
- data/examples/bookmarks/app/oauth.rb +43 -0
- data/examples/bookmarks/app/server.rb +184 -0
- data/examples/bookmarks/config/oauth-client-metadata.localhost.json +11 -0
- data/examples/bookmarks/config/oauth-client-metadata.production.json +19 -0
- data/examples/bookmarks/config.ru +5 -0
- data/examples/bookmarks/db/migrate/20261107004141_create_bookmarks.rb +27 -0
- data/examples/bookmarks/db/schema.rb +33 -0
- data/examples/bookmarks/public/styles.css +59 -0
- data/examples/bookmarks/scripts/generate_keys.rb +35 -0
- data/examples/bookmarks/views/bookmarks.erb +86 -0
- data/examples/bookmarks/views/index.erb +17 -0
- data/examples/bookmarks/views/layout.erb +20 -0
- data/examples/minisky_console/Gemfile.lock +2 -2
- data/examples/minisky_console/README.md +29 -25
- data/examples/minisky_console/app.rb +3 -3
- data/examples/minisky_console/localhost.rb +5 -7
- data/examples/minisky_console/production.rb +6 -8
- data/lib/authproto/client.rb +413 -126
- data/lib/authproto/configuration.rb +1 -1
- data/lib/authproto/dpop/client.rb +28 -25
- data/lib/authproto/dpop/key_set.rb +2 -0
- data/lib/authproto/dpop/nonce_manager.rb +23 -20
- data/lib/authproto/dpop/proof_generator.rb +6 -3
- data/lib/authproto/dpop/stored_nonce.rb +7 -5
- data/lib/authproto/dpop.rb +2 -0
- data/lib/authproto/encryption.rb +2 -0
- data/lib/authproto/http_client.rb +5 -5
- data/lib/authproto/http_helpers.rb +6 -0
- data/lib/authproto/metadata/authorization_server.rb +4 -3
- data/lib/authproto/metadata/client_metadata.rb +6 -2
- data/lib/authproto/metadata/resource_server.rb +4 -3
- data/lib/authproto/minisky.rb +120 -33
- data/lib/authproto/par/client.rb +4 -2
- data/lib/authproto/par/client_assertion.rb +4 -1
- data/lib/authproto/par/request.rb +2 -0
- data/lib/authproto/par/response.rb +2 -0
- data/lib/authproto/par.rb +2 -0
- data/lib/authproto/pkce.rb +2 -0
- data/lib/authproto/serialization/session.rb +2 -2
- data/lib/authproto/serialization/stored_nonce.rb +2 -2
- data/lib/authproto/state/session.rb +8 -41
- data/lib/authproto/state/session_info.rb +150 -0
- data/lib/authproto/state/session_manager.rb +18 -15
- data/lib/authproto/state.rb +3 -1
- data/lib/authproto/storage/interface.rb +10 -0
- data/lib/authproto/storage/key_builder.rb +3 -3
- data/lib/authproto/storage/memory.rb +24 -18
- data/lib/authproto/storage/sqlite.rb +14 -0
- data/lib/authproto/token/refresh.rb +2 -2
- data/lib/authproto/token/response.rb +2 -0
- data/lib/authproto/token/revocation.rb +4 -2
- data/lib/authproto/version.rb +1 -1
- data/lib/authproto.rb +6 -3
- data/sig/authproto/client.rbs +33 -10
- data/sig/authproto/dpop/client.rbs +9 -3
- data/sig/authproto/dpop/nonce_manager.rbs +6 -6
- data/sig/authproto/dpop/proof_generator.rbs +4 -4
- data/sig/authproto/dpop/stored_nonce.rbs +2 -2
- data/sig/authproto/http_client.rbs +23 -6
- data/sig/authproto/http_helpers.rbs +1 -0
- data/sig/authproto/metadata/authorization_server.rbs +3 -3
- data/sig/authproto/metadata/client_metadata.rbs +1 -1
- data/sig/authproto/metadata/resource_server.rbs +2 -2
- data/sig/authproto/minisky.rbs +57 -0
- data/sig/authproto/state/session.rbs +12 -6
- data/sig/authproto/state/session_info.rbs +23 -0
- data/sig/authproto/state/session_manager.rbs +7 -2
- data/sig/authproto/storage/interface.rbs +1 -0
- data/sig/authproto/storage/key_builder.rbs +1 -1
- data/sig/authproto/storage/memory.rbs +1 -1
- data/sig/authproto/storage/sqlite.rbs +1 -0
- data/sig/authproto/token/revocation.rbs +1 -0
- data/sig/authproto.rbs +3 -8
- metadata +37 -15
- data/examples/confidential_client/Gemfile +0 -14
- data/examples/confidential_client/README.md +0 -236
- data/examples/confidential_client/app.rb +0 -308
- data/examples/confidential_client/public/styles.css +0 -70
- data/examples/confidential_client/scripts/generate_keys.rb +0 -21
- data/examples/confidential_client/views/authorized.erb +0 -46
- data/examples/confidential_client/views/index.erb +0 -44
- data/sig/authproto/minisky_oauth.rbs +0 -27
- /data/examples/{confidential_client/config/oauth-client-metadata.example.json → basic_webapp/config/oauth-client-metadata.production.json} +0 -0
- /data/examples/{confidential_client → basic_webapp}/config.ru +0 -0
- /data/examples/{confidential_client → basic_webapp}/screenshots/screenshot-1-sign-in.png +0 -0
- /data/examples/{confidential_client → basic_webapp}/screenshots/screenshot-2-success.png +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 523ee74d9fc689f65676a8d6d854e84d38d45f6f22a5e68698aab47b211c10f6
|
|
4
|
+
data.tar.gz: 2d4bb3f7a69d889273a662634c0e519c958c70d0fbd697428a3ae01006c7b339
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db169d4593069312d81e9d8fb866b41d973a7b2e74ca9ae75adcc829325ff0a2ed316c8ff92412311e9e841a575effafbcea1286a90fe50f4fc2292de0ceae35
|
|
7
|
+
data.tar.gz: 9e0c2752138dbb31ca634d4b3715702cb02405cb3ef12b1d90bed3ef52387c990617be70fd7d88b66980d560fdfce8dd7df9de273fb7ee27ce5ae37c39ece6a1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
## [0.3.0.beta5] – 2026-11-10
|
|
2
|
+
|
|
3
|
+
- added `process_dpop`, `has_nonce_error?` and `with_nonce_handling` helpers to `Client`, proxying the calls to `dpop_client` for easier access
|
|
4
|
+
- added `Client#http` which lets you access the global HTTP client
|
|
5
|
+
- added `Client.for_localhost` and `Minisky::OAuthClient.for_localhost` for creating a localhost client with metadata encoded in the `client_id` query params
|
|
6
|
+
- added `Client.localhost_app?` helper for checking a client ID
|
|
7
|
+
- added `Minisky::OAuthClient.with_oauth_client` to reuse an existing `AuthProto::Client` instead of creating a new one
|
|
8
|
+
- added `Minisky::OAuthClient#did`
|
|
9
|
+
- renamed `server_url` params to `url` in `Client`, `DPoP::Client` and `DPoP::NonceManager` and to `origin` in `StoredNonce`
|
|
10
|
+
- `Client` now rejects a `metadata` hash passed in argument for localhost clients (since you need to put the values into the `client_id` query params anyway for the server to read them)
|
|
11
|
+
- `Client#handle_callback` now takes the callback parameters as a single Hash parameter instead of keyword args
|
|
12
|
+
- `Client` methods that returned a session data hash, return the data now as a `SessionInfo` object
|
|
13
|
+
- replaced `Client#get_tokens` with `#get_session`; it now returns a session also if it's pending or has an expired access token
|
|
14
|
+
- removed `Client#dpop_client` from public API
|
|
15
|
+
- removed `#granted_scope`, `#has_limited_scope?` and `#authorized?` from `Session`
|
|
16
|
+
- `uri:` and `url:` arguments across the project now accept also `URI` objects
|
|
17
|
+
- response hashes are now accepted also having status code as a String and header values as array, so you can now pass e.g. a `Net::HTTPResponse` as: `{ status: res.code, headers: res.to_hash, body: res.body }`
|
|
18
|
+
- `Minisky::OAuthClient` doesn't require a PDS hostname anymore to create an instance
|
|
19
|
+
- renamed `Minisky::OAuthClient` to `Minisky::OAuth`
|
|
20
|
+
- added `AuthProto.storage.cleanup_expired_records`
|
|
21
|
+
|
|
1
22
|
## [0.3.0.beta4] – 2026-11-03
|
|
2
23
|
|
|
3
24
|
- at the end of authentication that started with a PDS URL, verify that the received DID belongs to that PDS
|