Skip to content

Commit b00ac04

Browse files
committed
Correctly construct aud for scope verification
(different from aud for jwt)
1 parent dde0a7d commit b00ac04

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pegasus/lib/xrpc.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,10 @@ let service_proxy ?lxm ?aud (ctx : context) =
209209
| None ->
210210
Errors.invalid_request "invalid proxy header"
211211
in
212-
let aud = Option.value aud ~default:(service_did ^ "#" ^ service_type) in
212+
let aud = Option.value aud ~default:service_did in
213213
let lxm = Option.value lxm ~default:nsid in
214-
Auth.assert_rpc_scope ctx.auth ~aud ~lxm ;
215214
let fragment = "#" ^ service_type in
215+
Auth.assert_rpc_scope ctx.auth ~aud:(aud ^ fragment) ~lxm ;
216216
match%lwt Id_resolver.Did.resolve service_did with
217217
| Ok did_doc -> (
218218
let scheme, host =

0 commit comments

Comments
 (0)