TsgcWSAPIServer_WebAuthn › 이벤트 › OnWebAuthnRegistrationValidateCredentialId
/register/verify 중에 애플리케이션이 새 자격 증명 id가 사용자 저장소에서 고유한지 확인할 수 있도록 발생합니다.
property OnWebAuthnRegistrationValidateCredentialId: TsgcWebAuthnOnRegistrationValidateCredentialId;
// TsgcWebAuthnOnRegistrationValidateCredentialId = procedure(Sender: TObject; const aCredentialId: String; var Accept: Boolean) of object
—
attestation 응답을 검증하는 동안, 자격 증명이 수락되기 전에 발생합니다. aCredentialId는 인증자가 생성한 base64url 인코딩된 자격 증명 id입니다. 애플리케이션이 이미 이 자격 증명 id를 알고 있는 경우(충돌, 재생, 도난된 자격 증명 등) Accept를 false로 설정하십시오. 그러면 서버는 검증 오류와 함께 등록을 거부합니다. 사용자 데이터베이스가 지원하는 전역 고유성 제약 조건을 적용하려면 이 이벤트를 사용하십시오.
procedure TForm1.sgcWSAPIServer_WebAuthn1WebAuthnRegistrationValidateCredentialId(
Sender: TObject; const aCredentialId: String; var Accept: Boolean);
begin
Accept := not CredentialExists(aCredentialId);
end;