-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NIST-BRSKI policy app using claim cascade system #85
NIST-BRSKI policy app using claim cascade system #85
Conversation
Added various functions including VC upload, prolog queries, and email authentication
Note to self: things on the framework laptop are larger than they seem
Update branch
…ormationBoard component
…m' of https://github.com/nqminds/trustnetz into 70-implement-brski-policy-app-using-claim-cascade-system
… prolog (doesn't work yet)
…dpoint to check if a given device id can connect to network
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
App looks great, there's the bug we discussed on slack to fix, I've also found several places where client-side code could be extracted as react components to reduce code duplication.
); | ||
}; | ||
|
||
export default withAuth(Page); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This page.js and the page.js for device_id look very similar, could we extract some of the common code as components to be reused across both pages?
const data = { | ||
"@context": ["https://www.w3.org/ns/credentials/v2"], | ||
id: "urn:uuid:91cf3009-28ee-488e-8ae8-a751a289c8cb", | ||
type: ["VerifiableCredential", "UserCredential"], | ||
issuer: "urn:uuid:8bbabf61-758b-4bcb-8dab-4a4d1d493e25", | ||
validFrom: "2024-07-25T19:23:24Z", | ||
credentialSchema: { | ||
id: "https://github.com/nqminds/ClaimCascade/blob/claim_verifier/packages/claim_verifier/user.yaml", | ||
type: "JsonSchema", | ||
}, | ||
credentialSubject: { | ||
type: "fact", | ||
schemaName: "device_trust", | ||
id: uuidv4(), | ||
timestamp: 1716287268891, | ||
fact: { | ||
device_id: params.device_id, | ||
authoriser_id: emailAddress, | ||
created_at: Date.now(), | ||
}, | ||
}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generate from schema?
); | ||
}; | ||
|
||
export default withAuth(Page); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once again, very similar to the other page.js components for device and device_type, could we extract common components? Or even make the page a common component itself and only differentiate the 3 with props?
Changes
Notes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks for making those changes 👍
Setup
Install node dependencies with
npm i
in/packages/cahn_demo/client
and/packages/cahn_demo/server
.Run the client in
/packages/cahn_demo/client
withnpm run dev
.Run the server in
/packages/cahn_demo/server
withnpm run dev
.(Sorry, couldn't get npm workspaces to work for some reason)
Ensure you have populated the
/packages/cahn_demo/server/.env
file, according to the template found in/packages/cahn_demo/server/.env_example
.Notes
There is much clean up to be done with this code. However, it should be functionally correct.