masks 0.9.1 → 0.9.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 +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +7 -7
- data/lib/masks/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a915522b23f370321d7eca71a6d4965804d6988e441f6f019b1b1817bab7f0c3
|
|
4
|
+
data.tar.gz: 05f68f68ed521f6d378393cadda81bec7b984802f10ab651a5eaa8c9b31d4a7c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 13467dcc61e51edbb9a7493feb38ccb2cf0f1f42db9a127cb37ccb89c0bf3187de211f928bce1dd854d711f3418a0b504bb3a2b0e645ee8ac7d864b47fd8d4c5
|
|
7
|
+
data.tar.gz: 4b0b6abea05f55b54b9280de48c8096a8406fdd82e7dcb575584b56679ccb91fc3af11c2766cda26cee44ae8ace19f384a5714a0e3a81b029bcead957d8ba008
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.2](https://github.com/masksrb/masks/compare/gem/v0.9.1...gem/v0.9.2) (2026-10-10)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Documentation
|
|
7
|
+
|
|
8
|
+
* the examples name xixo, the resource server once called uris ([ca80f20](https://github.com/masksrb/masks/commit/ca80f20c9aea4ee6a3e7cd6c76c69425e4c800e3))
|
|
9
|
+
|
|
3
10
|
## [0.9.1](https://github.com/masksrb/masks/compare/gem/v0.9.0...gem/v0.9.1) (2026-10-04)
|
|
4
11
|
|
|
5
12
|
|
data/README.md
CHANGED
|
@@ -91,7 +91,7 @@ An app that is also a resource server:
|
|
|
91
91
|
class ApiController < ApplicationController
|
|
92
92
|
include Masks::Rails::ProtectedResource
|
|
93
93
|
|
|
94
|
-
masks_protect! scope: "
|
|
94
|
+
masks_protect! scope: "xixo:catalog:read", except: :metadata
|
|
95
95
|
|
|
96
96
|
def metadata
|
|
97
97
|
render json: masks_resource_metadata
|
|
@@ -144,7 +144,7 @@ in to none and `insufficient_role` when they hold another role. A resource serve
|
|
|
144
144
|
token:
|
|
145
145
|
|
|
146
146
|
```ruby
|
|
147
|
-
masks_protect! scope: "
|
|
147
|
+
masks_protect! scope: "xixo:catalog:write", role: "owner", organization: "acme"
|
|
148
148
|
```
|
|
149
149
|
|
|
150
150
|
Naming an organization without asking for the scope still holds the sign-in to its members and its
|
|
@@ -235,7 +235,7 @@ The flow that connects a first-party app:
|
|
|
235
235
|
|
|
236
236
|
```ruby
|
|
237
237
|
handshake = Masks::Client::Handshake.new(
|
|
238
|
-
issuer, name: "
|
|
238
|
+
issuer, name: "xixo", resource: "https://app.example.com/mcp",
|
|
239
239
|
redirect_uris: [ "https://app.example.com/auth/callback" ],
|
|
240
240
|
return_to: "https://app.example.com/"
|
|
241
241
|
)
|
|
@@ -254,11 +254,11 @@ the issuer it asked.
|
|
|
254
254
|
resource = Masks::Client::Resource.new(
|
|
255
255
|
issuer: "https://demo.auth.example.com",
|
|
256
256
|
url: "https://app.example.com/mcp",
|
|
257
|
-
scopes: { "
|
|
257
|
+
scopes: { "xixo:catalog:read" => "Search your catalog" }
|
|
258
258
|
)
|
|
259
259
|
|
|
260
260
|
claims = resource.authenticate(
|
|
261
|
-
request.authorization, scope: "
|
|
261
|
+
request.authorization, scope: "xixo:catalog:read",
|
|
262
262
|
proof: request.get_header("HTTP_DPOP"), method: request.request_method, url: request.url
|
|
263
263
|
)
|
|
264
264
|
claims.subject
|
|
@@ -286,7 +286,7 @@ scope.
|
|
|
286
286
|
A Rack middleware does the same below the framework, proof included:
|
|
287
287
|
|
|
288
288
|
```ruby
|
|
289
|
-
use Masks::Client::Rack, resource: resource, scope: "
|
|
289
|
+
use Masks::Client::Rack, resource: resource, scope: "xixo:catalog:read"
|
|
290
290
|
```
|
|
291
291
|
|
|
292
292
|
### Introspection
|
|
@@ -296,7 +296,7 @@ asks the issuer:
|
|
|
296
296
|
|
|
297
297
|
```ruby
|
|
298
298
|
found = session.introspect(token)
|
|
299
|
-
found.active? && found.permits?("
|
|
299
|
+
found.active? && found.permits?("xixo:catalog:read")
|
|
300
300
|
```
|
|
301
301
|
|
|
302
302
|
`Introspection` is a `Claims` whose `permit!` also raises when the token is not active.
|
data/lib/masks/version.rb
CHANGED