Skip to content

Commit

Permalink
fix: adopt jsonnet in e2e oidc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed May 6, 2020
1 parent 40ac3dc commit 5e518fb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 39 deletions.
2 changes: 1 addition & 1 deletion test/e2e/profiles/oidc/.kratos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ selfservice:
provider: generic
client_id: kratos-client
client_secret: kratos-secret
schema_url: file://test/e2e/profiles/oidc/hydra.schema.json
issuer_url: http://127.0.0.1:4444/
scope:
- offline
mapper_url: file://test/e2e/profiles/oidc/hydra.jsonnet

password:
enabled: true
Expand Down
13 changes: 13 additions & 0 deletions test/e2e/profiles/oidc/hydra.jsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
local claims = std.extVar('claims');

if std.length(claims.sub) == 0 then
error 'claim sub not set'
else
{
identity: {
traits: {
email: claims.sub,
[if "website" in claims then "website" else null]: claims.website,
},
},
}
38 changes: 0 additions & 38 deletions test/e2e/profiles/oidc/hydra.schema.json

This file was deleted.

0 comments on commit 5e518fb

Please sign in to comment.