proxy: add userinfo and webauthn endpoints (#3755)

* proxy: add userinfo and webauthn endpoints

* use TLD for RP id

* use EffectiveTLDPlusOne

* upgrade webauthn

* fix test

* Update internal/handlers/jwks.go

Co-authored-by: bobby <1544881+desimone@users.noreply.github.com>

Co-authored-by: bobby <1544881+desimone@users.noreply.github.com>
This commit is contained in:
Caleb Doxsey 2022-11-22 10:26:35 -07:00 committed by GitHub
parent 81053ac8ef
commit c1a522cd82
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 498 additions and 216 deletions

View file

@ -28,6 +28,7 @@ async function authenticateCredential(
challenge: decode(requestOptions?.challenge),
timeout: requestOptions?.timeout,
userVerification: requestOptions?.userVerification,
rpId: requestOptions?.rpId,
},
});
return credential as CredentialForAuthenticate;

View file

@ -39,6 +39,7 @@ async function createCredential(
})),
rp: {
name: creationOptions?.rp?.name,
id: creationOptions?.rp?.id,
},
timeout: creationOptions?.timeout,
user: {

View file

@ -58,6 +58,7 @@ export type WebAuthnCreationOptions = {
pubKeyCredParams: PublicKeyCredentialParameters[];
rp: {
name: string;
id: string;
};
timeout: number;
user: {
@ -75,6 +76,7 @@ export type WebAuthnRequestOptions = {
challenge: string;
timeout: number;
userVerification: UserVerificationRequirement;
rpId: string;
};
// page data