-
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
feat: ida auth sdk #49
base: main
Are you sure you want to change the base?
Conversation
@@ -14,6 +14,7 @@ | |||
}, | |||
"scripts": { | |||
"dev": "turbo run dev", | |||
"format": "prettier --write ." | |||
"format": "prettier --write .", | |||
"set-version": "node -e \"const fs=require('fs'),v=process.argv[1];['package.json',...fs.readdirSync('packages').map(d=>'packages/'+d+'/package.json')].forEach(f=>fs.writeFileSync(f,JSON.stringify({...require('./'+f),version:v},null,2)+'\\n'))\"" |
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.
GPT created helper for...
# bump package.json versions
yarn set-version 1.7.0-alpha.16
"@fastify/formbody": "^8.0.1", | ||
"@fastify/static": "^8.0.3", | ||
"@types/node": "^22.4.1", | ||
"@types/node-forge": "^1.3.11", | ||
"casual": "^1.6.2", | ||
"envalid": "^8.0.0", | ||
"fastify": "^5.0.0", | ||
"jose": "^5.9.6", | ||
"jsonwebtoken": "^9.0.2", | ||
"node-forge": "^1.3.1", | ||
"tsx": "^4.19.2", | ||
"typescript": "^5.6.3" |
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.
likely most are unneeded
export const padBase64 = (str: string) => | ||
str + "=".repeat((4 - (str.length % 4)) % 4); | ||
|
||
export const base64Encode = (input: string) => | ||
Buffer.from(input, "utf8").toString("base64url"); |
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.
Add a comment what and why
consent: boolean; | ||
} | ||
|
||
export default class MOSIPAuthenticator { |
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.
Yes, it's a class
. Wanted to keep the implementation similar to ida-auth-sdk
from mosip.
Implements the MOSIP IDA Auth SDK in Node.js for verifying the users details. This is a subset of the version featured in https://github.com/mosip/ida-auth-sdk/tree/release-0.9.x
To-do:
certs
folder. This convention is copied from the ida-auth-sdk repositorykeystore.p12
/ida-partner.crt
)