diff --git a/example/GetLoginProofInvitation/1.0/data.json b/example/GetLoginProofInvitation/1.0/data.json new file mode 100644 index 0000000000000000000000000000000000000000..0667443c63a429efd8a5eccf42961b599e29a414 --- /dev/null +++ b/example/GetLoginProofInvitation/1.0/data.json @@ -0,0 +1,7 @@ +{ + "scopes": { + "openid": "principalMembershipCredential", + "profile": "universityCert", + "email": "emailScope" + } +} \ No newline at end of file diff --git a/example/GetLoginProofInvitation/1.0/policy.rego b/example/GetLoginProofInvitation/1.0/policy.rego index b42142d6eb34f87936d404c1c39723d2619f918a..5534e740f082d6756119220411059a1bb45dc619 100644 --- a/example/GetLoginProofInvitation/1.0/policy.rego +++ b/example/GetLoginProofInvitation/1.0/policy.rego @@ -1,13 +1,3 @@ package example.GetLoginProofInvitation -# commented until OCM ready with their enpoints - -# ocm.loginProofInviation should be a custom function written in Go -# requestId := ocm.loginProofInvitation().data.presentation_id -# link := ocm.loginProofInvitation().data.presentationMessage - - -# for now returning mock -requestId := uuid.rfc4122("client_id") -link := "https://picsum.photos/id/237/200/300" - +_ = ocm.getLoginProofInvitation(input.scope, data.scopes) diff --git a/example/GetLoginProofResult/1.0/policy.rego b/example/GetLoginProofResult/1.0/policy.rego index 927fb392ebe47054711684645c651137c4bd24f5..d550070ec0ecc157e75bc2aabfc699e480432684 100644 --- a/example/GetLoginProofResult/1.0/policy.rego +++ b/example/GetLoginProofResult/1.0/policy.rego @@ -1,26 +1,5 @@ package example.GetLoginProofResult -# commented until OCM ready with their enpoints +_ = ocm.getLoginProofResult(input.requestId) -# ocm.loginProofResult should be a custom function written in Go -# _ := ocm.loginProofResult() - - -# for now returning mock -_ = { - "status": "ACCEPTED", - "name": "John", - "given_name": "John I", - "family_name": "Doe", - "middle_name": "", - "preferred_username": "John Doe", - "gender": "M", - "birthdate": "01.01.1970", - "upated_at": 1656497093, - "email": "john.doe@sample.com", - "email_verified": true, - "sub": "John Doe", - "iss": "https://gaiax.vereign.com/tsa", - "auth_time": 1656583493 -}