-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add prf
extension
#65
Comments
Hey @lgarron, I am new to this codebase. But would like to take up this issue. |
Feel free to tackle a PR. Do you need any help beyond the links above? |
We need a way for the schema to specify that all the *values* of an object need to be translated for arbitrary keys.
The following is working for me: webauthnJSON.schema.credentialCreationOptions.publicKey.schema.extensions.schema.prf = {
required: false,
schema: {
eval: {
required: false,
schema: {
first: {
required: true,
schema: "convert"
}
}
},
evalByCredential: {
required: false,
schema: "copy",
derive: function (input) {
console.log("derive");
console.log(input);
let evalByCredentialObject = input.evalByCredential;
if (!(evalByCredentialObject instanceof Object)) {
return;
}
for (const [key, value] of Object.entries(evalByCredentialObject)) {
console.log("first: " + value.first);
value.first = $this.base64urlToBuffer(value.first);
}
return evalByCredentialObject;
}
}
}
};
webauthnJSON.schema.credentialCreationOptions.publicKey.schema.extensions.schema.uvm = {
required: false,
schema: "copy"
};
webauthnJSON.schema.publicKeyCredentialWithAttestation.clientExtensionResults.schema.prf = {
required: false,
schema: {
enabled: {
required: false,
schema: "copy"
},
results: {
required: false,
schema: {
first: {
required: true,
schema: "convert"
}
}
}
}
};
webauthnJSON.schema.publicKeyCredentialWithAttestation.clientExtensionResults.schema.uvm = {
required: false,
schema: "copy"
}; Only getting |
Hey @lgarron 👋 , I want to take this up. |
@raashidanwar As I no longer work at GitHub, I can't maintain this project. Perhaps @KyFaSt or @fletchto99 can tell you if this project is open to contributions. |
w3c/webauthn#1732 re-added this: https://w3c.github.io/webauthn/#prf-extension
We need to add support here:
webauthn-json/src/webauthn-json/extended/schema.ts
Lines 12 to 34 in 5206e71
webauthn-json/src/webauthn-json/extended/json.ts
Lines 12 to 36 in 5206e71
The text was updated successfully, but these errors were encountered: