Versions in this module Expand all Collapse all v0 v0.1.1 Feb 25, 2022 v0.1.0 Feb 24, 2022 Changes in this version + const ChallengeLength + 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 ErrAuthenticatorNotAllowed = &Error + var ErrBadRequest = &Error + var ErrChallengeMismatch = &Error + var ErrCounterError = &Error + var ErrCredentialAlreadyExists = &Error + var ErrCredentialNotFound = &Error + var ErrInvalidAttestation = &Error + var ErrMetadataNotFound = &Error + var ErrNotImplemented = &Error + var ErrNotSpecImplemented = &Error + var ErrParsingData = &Error + var ErrUnsupportedAlgorithm = &Error + var ErrUnsupportedKey = &Error + var ErrVerification = &Error + func FullyQualifiedOrigin(u *url.URL) string + func GenerateAttestationCertificateKeyIdentifier(pcc *ParsedCredentialCreationData) (string, error) + func GetMetadataStatement(pcc *ParsedCredentialCreationData, metadataService metadata.MetadataService) *metadata.MetadataStatement + func RegisterAttestationFormat(format string, handler attestationFormatValidationHandler) + func ResidentKeyRequired() *bool + func ResidentKeyUnrequired() *bool + func VerifyX509CertificateChainAgainstMetadata(metadataStatement *metadata.MetadataStatement, x5c []interface{}) error + type AllowAllPolicy struct + func (aap AllowAllPolicy) Verify(pcc *ParsedCredentialCreationData, attestationTrustworthinessError error, ...) error + type AllowOnlyAuthenticatorFromMetadataServicePolicy struct + func (msp AllowOnlyAuthenticatorFromMetadataServicePolicy) Verify(pcc *ParsedCredentialCreationData, attestationTrustworthinessError error, ...) error + type AllowlistPolicy struct + Allowlist []string + func (ap AllowlistPolicy) Verify(pcc *ParsedCredentialCreationData, attestationTrustworthinessError error, ...) error + type AttestationObject struct + AttStatement map[string]interface{} + 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]interface + type AuthenticationExtensionsClientOutputs map[interface{}]interface + type AuthenticatorAssertionResponse struct + AuthenticatorData URLEncodedBase64 + Signature URLEncodedBase64 + UserHandle URLEncodedBase64 + type AuthenticatorAttachment string + const CrossPlatform + const Platform + type AuthenticatorAttestationResponse struct + AttestationObject URLEncodedBase64 + func (ccr *AuthenticatorAttestationResponse) Parse() (*ParsedAttestationResponse, error) + type AuthenticatorData struct + AttData AttestedCredentialData + Counter uint32 + ExtData []byte + Flags AuthenticatorFlags + RPIDHash []byte + func (a *AuthenticatorData) Unmarshal(rawAuthData []byte) error + func (a *AuthenticatorData) Verify(rpIdHash []byte, userVerificationRequired bool) error + type AuthenticatorFlags byte + const FlagAttestedCredentialData + const FlagHasExtensions + const FlagUserPresent + const FlagUserVerified + func (flag AuthenticatorFlags) HasAttestedCredentialData() bool + func (flag AuthenticatorFlags) HasExtensions() bool + func (flag AuthenticatorFlags) UserPresent() bool + func (flag AuthenticatorFlags) UserVerified() bool + type AuthenticatorResponse struct + ClientDataJSON URLEncodedBase64 + type AuthenticatorSelection struct + AuthenticatorAttachment AuthenticatorAttachment + RequireResidentKey *bool + UserVerification UserVerificationRequirement + type AuthenticatorTransport string + const BLE + const Internal + const NFC + const USB + type CeremonyType string + const AssertCeremony + const CreateCeremony + type Challenge []byte + func CreateChallenge() (Challenge, error) + func (c *Challenge) UnmarshalJSON(data []byte) error + func (c Challenge) MarshalJSON() ([]byte, error) + func (c Challenge) String() string + type CollectedClientData struct + Challenge string + Hint string + Origin string + TokenBinding *TokenBinding + Type CeremonyType + func (c *CollectedClientData) Verify(storedChallenge string, ceremony CeremonyType, relyingPartyOrigins []string) error + type ConveyancePreference string + const PreferDirectAttestation + const PreferIndirectAttestation + const PreferNoAttestation + type Credential struct + ID string + Type string + type CredentialAssertion struct + Response PublicKeyCredentialRequestOptions + type CredentialAssertionResponse struct + AssertionResponse AuthenticatorAssertionResponse + type CredentialCreation struct + Response PublicKeyCredentialCreationOptions + type CredentialCreationResponse struct + AttestationResponse AuthenticatorAttestationResponse + type CredentialDescriptor struct + CredentialID URLEncodedBase64 + Transport []AuthenticatorTransport + Type CredentialType + type CredentialEntity struct + Icon string + 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 (err *Error) Error() string + func (passedError *Error) WithDetails(details string) *Error + func (passedError *Error) WithInfo(info string) *Error + type Extensions interface + 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 + 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) (*ParsedCredentialAssertionData, error) + func (p *ParsedCredentialAssertionData) Verify(storedChallenge string, relyingPartyID string, relyingPartyOrigins []string, ...) error + type ParsedCredentialCreationData struct + Raw CredentialCreationResponse + Response ParsedAttestationResponse + func ParseCredentialCreationResponse(response *http.Request) (*ParsedCredentialCreationData, error) + func ParseCredentialCreationResponseBody(body io.Reader) (*ParsedCredentialCreationData, error) + func (pcc *ParsedCredentialCreationData) Verify(storedChallenge string, verifyUser bool, relyingPartyID string, ...) error + type ParsedPublicKeyCredential struct + Extensions AuthenticationExtensionsClientOutputs + RawID []byte + type PublicKeyCredential struct + Extensions AuthenticationExtensionsClientOutputs + RawID URLEncodedBase64 + type PublicKeyCredentialCreationOptions struct + Attestation ConveyancePreference + AuthenticatorSelection AuthenticatorSelection + Challenge Challenge + CredentialExcludeList []CredentialDescriptor + Extensions AuthenticationExtensions + Parameters []CredentialParameter + RelyingParty RelyingPartyEntity + Timeout int + User UserEntity + type PublicKeyCredentialRequestOptions struct + AllowedCredentials []CredentialDescriptor + Challenge Challenge + Extensions AuthenticationExtensions + RelyingPartyID string + Timeout int + UserVerification UserVerificationRequirement + func (a *PublicKeyCredentialRequestOptions) GetAllowedCredentialIDs() [][]byte + type RelyingPartyEntity struct + ID string + type RelyingPartyPolicy interface + Verify func(pcc *ParsedCredentialCreationData, attestationTrustworthinessError error, ...) error + type SafetyNetResponse struct + ApkCertificateDigestSha256 []interface{} + 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 URLEncodedBase64 []byte + func (data URLEncodedBase64) MarshalJSON() ([]byte, error) + func (dest *URLEncodedBase64) UnmarshalJSON(data []byte) error + type UserEntity struct + DisplayName string + ID URLEncodedBase64 + type UserVerificationRequirement string + const VerificationDiscouraged + const VerificationPreferred + const VerificationRequired