mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-12 19:32:48 -06:00
5faa4e2e67
Introducing the `io.jwt.verify_eddsa` built-in, and adding support to the following built-ins: * `io.jwt.decode_verify` * `io.jwt.encode_sign` * `io.jwt.encode_sign_raw` Signed-off-by: Johan Fylling <johan.dev@fylling.se>
18 lines
604 B
YAML
18 lines
604 B
YAML
---
|
|
cases:
|
|
- note: jwtverifyeddsa/success-cert
|
|
query: data.generated.p = x
|
|
modules:
|
|
- |
|
|
package generated
|
|
|
|
p := x {
|
|
io.jwt.verify_eddsa(
|
|
"eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWUsImlhdCI6MTUxNjIzOTAyMn0.JkKWCY39IdWEQttmdqR7VdsvT-_QxheW_eb0S5wr_j83ltux_JDUIXs7a3Dtn3xuqzuhetiuJrWIvy5TzimeCg",
|
|
"-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEAwmK6SSAu2E9V7uynkCKEaj5nZJyTvNG4x0KohsRzLpg=\n-----END PUBLIC KEY-----",
|
|
x)
|
|
}
|
|
data: {}
|
|
want_result:
|
|
- x: true
|