Versions in this module Expand all Collapse all v0 v0.0.1 May 6, 2024 Changes in this version + const ChallengeLength + const CredentialTypeFIDOU2F + const ExtensionAppID + const ExtensionAppIDExclude + const Failed + const KM_ORIGIN_DERIVED + const KM_ORIGIN_GENERATED + const KM_ORIGIN_IMPORTED + const KM_ORIGIN_UNKNOWN + const KM_PURPOSE_DECRYPT + const KM_PURPOSE_DERIVE_KEY + const KM_PURPOSE_ENCRYPT + const KM_PURPOSE_SIGN + const KM_PURPOSE_VERIFY + const KM_PURPOSE_WRAP + const SelfSigned + const Unverified + const Verified + var ErrAssertionSignature = &Error + var ErrAttestation = &Error + var ErrAttestationCertificate = &Error + var ErrAttestationFormat = &Error + var ErrAuthData = &Error + var ErrBadRequest = &Error + var ErrChallengeMismatch = &Error + var ErrInvalidAttestation = &Error + var ErrNotImplemented = &Error + var ErrNotSpecImplemented = &Error + var ErrParsingData = &Error + var ErrUnsupportedAlgorithm = &Error + var ErrUnsupportedKey = &Error + var ErrVerification = &Error + func FullyQualifiedOrigin(rawOrigin string) (fqOrigin string, err error) + func RegisterAttestationFormat(format AttestationFormat, handler attestationFormatValidationHandler) + func ResidentKeyNotRequired() *bool + func ResidentKeyRequired() *bool + type AppleAnonymousAttestation struct + Nonce []byte + type AttestationFormat string + const AttestationFormatAndroidKey + const AttestationFormatAndroidSafetyNet + const AttestationFormatApple + const AttestationFormatFIDOUniversalSecondFactor + const AttestationFormatNone + const AttestationFormatPacked + const AttestationFormatTPM + type AttestationObject struct + AttStatement map[string]any + AuthData AuthenticatorData + Format string + RawAuthData []byte + func (attestationObject *AttestationObject) Verify(relyingPartyID string, clientDataHash []byte, verificationRequired bool) error + type AttestedCredentialData struct + AAGUID []byte + CredentialID []byte + CredentialPublicKey []byte + type AuthenticationExtensions map[string]any + type AuthenticationExtensionsClientOutputs map[string]any + type AuthenticatorAssertionResponse struct + AuthenticatorData URLEncodedBase64 + Signature URLEncodedBase64 + UserHandle URLEncodedBase64 + type AuthenticatorAttachment string + const CrossPlatform + const Platform + type AuthenticatorAttestationResponse struct + AttestationObject URLEncodedBase64 + AuthenticatorData URLEncodedBase64 + PublicKey URLEncodedBase64 + PublicKeyAlgorithm int64 + Transports []string + func (ccr *AuthenticatorAttestationResponse) Parse() (p *ParsedAttestationResponse, err error) + type AuthenticatorData struct + AttData AttestedCredentialData + Counter uint32 + ExtData []byte + Flags AuthenticatorFlags + RPIDHash []byte + func (a *AuthenticatorData) Unmarshal(rawAuthData []byte) (err error) + func (a *AuthenticatorData) Verify(rpIdHash []byte, appIDHash []byte, userVerificationRequired bool) error + type AuthenticatorFlags byte + const FlagAttestedCredentialData + const FlagBackupEligible + const FlagBackupState + const FlagHasExtensions + const FlagRFU1 + const FlagRFU2 + const FlagUserPresent + const FlagUserVerified + func (flag AuthenticatorFlags) HasAttestedCredentialData() bool + func (flag AuthenticatorFlags) HasBackupEligible() bool + func (flag AuthenticatorFlags) HasBackupState() bool + func (flag AuthenticatorFlags) HasExtensions() bool + func (flag AuthenticatorFlags) HasUserPresent() bool + func (flag AuthenticatorFlags) HasUserVerified() bool + func (flag AuthenticatorFlags) UserPresent() bool + func (flag AuthenticatorFlags) UserVerified() bool + type AuthenticatorResponse struct + ClientDataJSON URLEncodedBase64 + type AuthenticatorSelection struct + AuthenticatorAttachment AuthenticatorAttachment + RequireResidentKey *bool + ResidentKey ResidentKeyRequirement + UserVerification UserVerificationRequirement + type AuthenticatorTransport string + const BLE + const Hybrid + const Internal + const NFC + const SmartCard + const USB + type CeremonyType string + const AssertCeremony + const CreateCeremony + type CollectedClientData struct + Challenge string + CrossOrigin bool + Hint string + Origin string + TokenBinding *TokenBinding + TopOrigin string + Type CeremonyType + func (c *CollectedClientData) Verify(storedChallenge string, ceremony CeremonyType, ...) (err error) + type ConveyancePreference string + const PreferDirectAttestation + const PreferEnterpriseAttestation + const PreferIndirectAttestation + const PreferNoAttestation + type Credential struct + ID string + Type string + type CredentialAssertion struct + Response PublicKeyCredentialRequestOptions + type CredentialAssertionResponse struct + AssertionResponse AuthenticatorAssertionResponse + func (car CredentialAssertionResponse) Parse() (par *ParsedCredentialAssertionData, err error) + type CredentialCreation struct + Response PublicKeyCredentialCreationOptions + type CredentialCreationResponse struct + AttestationResponse AuthenticatorAttestationResponse + func (ccr CredentialCreationResponse) Parse() (pcc *ParsedCredentialCreationData, err error) + type CredentialDescriptor struct + AttestationType string + CredentialID URLEncodedBase64 + Transport []AuthenticatorTransport + Type CredentialType + type CredentialEntity struct + Name string + type CredentialParameter struct + Algorithm webauthncose.COSEAlgorithmIdentifier + Type CredentialType + type CredentialType string + const PublicKeyCredentialType + type Error struct + Details string + DevInfo string + Type string + func (e *Error) Error() string + func (e *Error) WithDetails(details string) *Error + func (e *Error) WithInfo(info string) *Error + type Extensions any + type KM_KEY_ORIGIN int + type KM_PURPOSE int + type ParsedAssertionResponse struct + AuthenticatorData AuthenticatorData + CollectedClientData CollectedClientData + Signature []byte + UserHandle []byte + type ParsedAttestationResponse struct + AttestationObject AttestationObject + CollectedClientData CollectedClientData + Transports []AuthenticatorTransport + type ParsedCredential struct + ID string + Type string + type ParsedCredentialAssertionData struct + Raw CredentialAssertionResponse + Response ParsedAssertionResponse + func ParseCredentialRequestResponse(response *http.Request) (*ParsedCredentialAssertionData, error) + func ParseCredentialRequestResponseBody(body io.Reader) (par *ParsedCredentialAssertionData, err error) + func (p *ParsedCredentialAssertionData) Verify(storedChallenge string, relyingPartyID string, ...) error + type ParsedCredentialCreationData struct + Raw CredentialCreationResponse + Response ParsedAttestationResponse + func ParseCredentialCreationResponse(response *http.Request) (*ParsedCredentialCreationData, error) + func ParseCredentialCreationResponseBody(body io.Reader) (pcc *ParsedCredentialCreationData, err error) + func (pcc *ParsedCredentialCreationData) Verify(storedChallenge string, verifyUser bool, relyingPartyID string, ...) error + type ParsedPublicKeyCredential struct + AuthenticatorAttachment AuthenticatorAttachment + ClientExtensionResults AuthenticationExtensionsClientOutputs + RawID []byte + func (ppkc ParsedPublicKeyCredential) GetAppID(authExt AuthenticationExtensions, credentialAttestationType string) (appID string, err error) + type PublicKeyCredential struct + AuthenticatorAttachment string + ClientExtensionResults AuthenticationExtensionsClientOutputs + RawID URLEncodedBase64 + type PublicKeyCredentialCreationOptions struct + Attestation ConveyancePreference + AttestationFormats []AttestationFormat + AuthenticatorSelection AuthenticatorSelection + Challenge URLEncodedBase64 + CredentialExcludeList []CredentialDescriptor + Extensions AuthenticationExtensions + Hints []PublicKeyCredentialHints + Parameters []CredentialParameter + RelyingParty RelyingPartyEntity + Timeout int + User UserEntity + type PublicKeyCredentialHints string + const PublicKeyCredentialHintClientDevice + const PublicKeyCredentialHintHybrid + const PublicKeyCredentialHintSecurityKey + type PublicKeyCredentialRequestOptions struct + AllowedCredentials []CredentialDescriptor + Challenge URLEncodedBase64 + Extensions AuthenticationExtensions + Hints []PublicKeyCredentialHints + RelyingPartyID string + Timeout int + UserVerification UserVerificationRequirement + func (a *PublicKeyCredentialRequestOptions) GetAllowedCredentialIDs() [][]byte + type RelyingPartyEntity struct + ID string + type ResidentKeyRequirement string + const ResidentKeyRequirementDiscouraged + const ResidentKeyRequirementPreferred + const ResidentKeyRequirementRequired + type SafetyNetResponse struct + ApkCertificateDigestSha256 []any + ApkDigestSha256 string + ApkPackageName string + BasicIntegrity bool + CtsProfileMatch bool + Nonce string + TimestampMs int64 + type ServerResponse struct + Message string + Status ServerResponseStatus + type ServerResponseStatus string + const StatusFailed + const StatusOk + type TokenBinding struct + ID string + Status TokenBindingStatus + type TokenBindingStatus string + const NotSupported + const Present + const Supported + type TopOriginVerificationMode int + const TopOriginAutoVerificationMode + const TopOriginDefaultVerificationMode + const TopOriginExplicitVerificationMode + const TopOriginIgnoreVerificationMode + const TopOriginImplicitVerificationMode + type URLEncodedBase64 []byte + func CreateChallenge() (challenge URLEncodedBase64, err error) + func (e *URLEncodedBase64) UnmarshalJSON(data []byte) error + func (e URLEncodedBase64) MarshalJSON() ([]byte, error) + func (e URLEncodedBase64) String() string + type UserEntity struct + DisplayName string + ID any + type UserVerificationRequirement string + const VerificationDiscouraged + const VerificationPreferred + const VerificationRequired