-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Basic Implementation of Policy Constraints * Add new API endpoints for authentication response and test requests * add initial dynamic enpoint logic * fix: move files to dynamic folder * enable parametric policy from sp * fix: define types for input descriptor and presentation definition * add verifiable id descriptor * add logic to parametrically use input descriptor for each incr auth * update redirect URIs in test_client.sh * refactor, create getToken and getMetadata to reuse it in both methods * separete get and post method * use async/await for execute function * chore: flatten credFit array in extractClaims.ts * fix: use async await to read file * chore: update OIDC_CLIENT_ID in .env file with client ID from test_client.sh, and add middleware for unauth access * chore: Update middleware to protect additional paths and use API key for authorization * chore: Update test_client.sh to use OIDC_CLIENT_ID from .env file * OIDC Discovery Fix * Fixes issue #20 * chore: Update dependencies and improve logging * Update npm dependencies to the latest stable version * Implement logging improvements using pino * Replace console.error with logger.error for error handling * Remove unnecessary console.log statements * Adopted absolute imports * Fix missing styles source * Less Hydra logs * test for dmo * update to logger.debug, use lib for common piece of code in endpoints * Changed default token * Adopted absolute imports * Adopted absolute imports * Fix missing styles source * Logging improvements with pino * refactor extractClaims.ts * refactor clientMetadata endpoint * update package-lock.json via npm i * use async await to get the loginPolicy * adjust unit tests for multi VC VP and constraints check * remove old tests that are not needed anymore * add a policy with complex constraints * add test for the new policy * refactor extractClaims to fix a bug related to accept policy with more than two VCs and complex constraints * instead of redis.set or get use redisGet and redisSet * introduce policy type to order credentials in a presentation * add test data and test for triple VC * add checks on extractClaims to ensure the VC order is correct and the correct policy is applied. * edit README.md for dynamic_bridge_endpoint approach * add swagger for dynamic api endpoint documentation * adjust readme.md for swagger documentation * use VC type instead of credential subject type * chore: Await extraction of user claims in presentCredential API * fix minimal test script * package maintenance * Fix license headers * Add http logging middleware * Logger cleanup * First API test * Version bump * Fixed test env loading * Fixed unit test * Reverted login policy loading to be more efficient * Added helper to check loaded policy syntax * Rewrote and fixed policy validation and claim extraction * Cleaned README * Cleaner loading of policy * Simplified incremental authentication API flow * Slight test improvement for presentCredential API * Amended README regarding mobile only --------- Signed-off-by: Felix Hoops <[email protected]> Signed-off-by: Ilayda Cansin Koc <[email protected]> Co-authored-by: Felix Hoops <[email protected]>
- Loading branch information
1 parent
d4762f4
commit 7ca5a67
Showing
54 changed files
with
5,715 additions
and
1,431 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
#!/bin/bash | ||
client=$(docker run --rm -it \ | ||
--network ory-hydra-net \ | ||
oryd/hydra:v2.2.0 \ | ||
create client --skip-tls-verify \ | ||
--name testclient \ | ||
--secret some-secret \ | ||
--grant-type authorization_code \ | ||
--response-type token,code,id_token \ | ||
--scope openid \ | ||
--redirect-uri http://localhost:9010/callback \ | ||
-e http://hydra:4445 \ | ||
--format json ) | ||
--network ory-hydra-net \ | ||
oryd/hydra:v2.2.0 \ | ||
create client --skip-tls-verify \ | ||
--name testclient \ | ||
--secret some-secret \ | ||
--grant-type authorization_code \ | ||
--response-type token,code,id_token \ | ||
--scope openid \ | ||
--redirect-uri "http://localhost:9010/callback" \ | ||
-e http://hydra:4445 \ | ||
--format json) | ||
|
||
echo $client | ||
echo "$client" | ||
|
||
client_id=$(echo $client | jq -r '.client_id') | ||
client_id=$(echo "$client" | jq -r ".client_id") | ||
|
||
docker run --rm -it \ | ||
--network ory-hydra-net \ | ||
-p 9010:9010 \ | ||
oryd/hydra:v2.2.0 \ | ||
perform authorization-code --skip-tls-verify \ | ||
--port 9010 \ | ||
--client-id $client_id \ | ||
--client-secret some-secret \ | ||
--redirect http://localhost:9010/callback \ | ||
--scope openid \ | ||
--auth-url http://localhost:5004/oauth2/auth \ | ||
--token-url http://hydra:4444/oauth2/token \ | ||
-e http://hydra:4444 | ||
--network ory-hydra-net \ | ||
-p 9010:9010 \ | ||
oryd/hydra:v2.2.0 \ | ||
perform authorization-code --skip-tls-verify \ | ||
--port 9010 \ | ||
--client-id "$client_id" \ | ||
--client-secret some-secret \ | ||
--redirect "http://localhost:9010/callback" \ | ||
--scope openid \ | ||
--auth-url http://localhost:5004/oauth2/auth \ | ||
--token-url http://hydra:4444/oauth2/token \ | ||
-e http://hydra:4444 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
LOGIN_POLICY=./__tests__/testdata/policies/acceptAnything.json | ||
DID_KEY_JWK={"kty":"OKP","crv":"Ed25519","x":"cwa3dufHNLg8aQb2eEUqTyoM1cKQW3XnOkMkj_AAl5M","d":"me03qhLByT-NKrfXDeji-lpADSpVOKWoaMUzv5EyzKY"} | ||
EXTERNAL_URL=http://example.com | ||
INCR_AUTH_API_SECRET=verysecret |
18 changes: 18 additions & 0 deletions
18
vclogin/__tests__/testdata/pex/descriptorVerifiableIDFromAltme.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ | ||
{ | ||
"id": "verifiableId", | ||
"name": "Input descriptor for login credential", | ||
"purpose": "Please provide your VerifiableId credential to sign-in.", | ||
"constraints": { | ||
"fields": [ | ||
{ | ||
"path": ["$.credentialSubject.type"], | ||
"filter": { | ||
"type": "string", | ||
"pattern": "VerifiableId" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[ | ||
{ | ||
"credentialId": "credential1", | ||
"credentialId": "1", | ||
"patterns": [ | ||
{ | ||
"issuer": "*", | ||
|
Oops, something went wrong.