mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-06 10:21:05 +02:00
authorize: fix indentation
This commit is contained in:
parent
428dee99c4
commit
903a2d401f
1 changed files with 28 additions and 28 deletions
|
@ -1,45 +1,45 @@
|
||||||
package pomerium.authz
|
package pomerium.authz
|
||||||
|
|
||||||
jwt_header := {
|
jwt_header := {
|
||||||
"typ": "JWT",
|
"typ": "JWT",
|
||||||
"alg": "HS256"
|
"alg": "HS256"
|
||||||
}
|
}
|
||||||
signing_key := {
|
signing_key := {
|
||||||
"kty": "oct",
|
"kty": "oct",
|
||||||
"k": "OkFmqMK9U0dmPhMCW0VYy6D_raJKwEJsMdxqdnukThzko3D_XrsihwYE0pxrUSpm0JTrW2QpIz4rT1vdEvZw67WP4xrqjiwyd7PgpPTD5xvQBM7TIKiSW0X2R0pfq_OItszPQRtb7VirrSbGJiLNS-NJMMrYVKWWtUbVSTXEjL7VcFqML5PiSe7XDmyCZjpgEpfE5Q82zIeXM2sLrz6HW2A9IwGk7mWS0c57R_2JGyFO2tCA4zEIYhWvLE62Os2tZ6YrrwdB8n35jlPpgUE6poEvIU20lPLaocozXYMqAku-KJnloJlAzKg2Xa_0iSiSgSAumx44B3n7DQjg3jPhRg"
|
"k": "OkFmqMK9U0dmPhMCW0VYy6D_raJKwEJsMdxqdnukThzko3D_XrsihwYE0pxrUSpm0JTrW2QpIz4rT1vdEvZw67WP4xrqjiwyd7PgpPTD5xvQBM7TIKiSW0X2R0pfq_OItszPQRtb7VirrSbGJiLNS-NJMMrYVKWWtUbVSTXEjL7VcFqML5PiSe7XDmyCZjpgEpfE5Q82zIeXM2sLrz6HW2A9IwGk7mWS0c57R_2JGyFO2tCA4zEIYhWvLE62Os2tZ6YrrwdB8n35jlPpgUE6poEvIU20lPLaocozXYMqAku-KJnloJlAzKg2Xa_0iSiSgSAumx44B3n7DQjg3jPhRg"
|
||||||
}
|
}
|
||||||
shared_key := base64url.decode(signing_key.k)
|
shared_key := base64url.decode(signing_key.k)
|
||||||
|
|
||||||
test_email_allowed {
|
test_email_allowed {
|
||||||
user := io.jwt.encode_sign(jwt_header, {
|
user := io.jwt.encode_sign(jwt_header, {
|
||||||
"aud": ["example.com"],
|
"aud": ["example.com"],
|
||||||
"email": "joe@example.com"
|
"email": "joe@example.com"
|
||||||
}, signing_key)
|
}, signing_key)
|
||||||
|
|
||||||
allow with data.route_policies as [{
|
allow with data.route_policies as [{
|
||||||
"source": "example.com",
|
"source": "example.com",
|
||||||
"allowed_users": ["joe@example.com"]
|
"allowed_users": ["joe@example.com"]
|
||||||
}] with data.signing_key as signing_key with data.shared_key as shared_key with input as {
|
}] with data.signing_key as signing_key with data.shared_key as shared_key with input as {
|
||||||
"url": "http://example.com",
|
"url": "http://example.com",
|
||||||
"host": "example.com",
|
"host": "example.com",
|
||||||
"user": user
|
"user": user
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
test_email_denied {
|
test_email_denied {
|
||||||
user := io.jwt.encode_sign(jwt_header, {
|
user := io.jwt.encode_sign(jwt_header, {
|
||||||
"aud": ["example.com"],
|
"aud": ["example.com"],
|
||||||
"email": "joe@example.com"
|
"email": "joe@example.com"
|
||||||
}, signing_key)
|
}, signing_key)
|
||||||
|
|
||||||
not allow with data.route_policies as [{
|
not allow with data.route_policies as [{
|
||||||
"source": "example.com",
|
"source": "example.com",
|
||||||
"allowed_users": ["bob@example.com"]
|
"allowed_users": ["bob@example.com"]
|
||||||
}] with data.signing_key as signing_key with data.shared_key as shared_key with input as {
|
}] with data.signing_key as signing_key with data.shared_key as shared_key with input as {
|
||||||
"url": "http://example.com",
|
"url": "http://example.com",
|
||||||
"host": "example.com",
|
"host": "example.com",
|
||||||
"user": user
|
"user": user
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
test_parse_url {
|
test_parse_url {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue