Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidSignature = errors.New("invalid the assertion signature") ErrUnmatchRPIDHash = errors.New("RP Hash mismatch") )
Functions ¶
Types ¶
type AssertionObject ¶
type AssertionObject struct { // ASN.1 Encoded as a Sequence of two integers Signature []byte `cbor:"signature"` AuthData []byte `cbor:"authenticatorData"` }
func (*AssertionObject) Unmarshal ¶
func (obj *AssertionObject) Unmarshal(rawBytes []byte) error
type AssertionService ¶
type AssertionService struct { AppID string Challenge string PublicKey *ecdsa.PublicKey Counter uint32 }
func (*AssertionService) Verify ¶
func (service *AssertionService) Verify(assertObject *AssertionObject, challenge string, clientData []byte) (uint32, error)
type AttestationObject ¶
type AttestationObject struct { // The byteform version of the authenticator data, used in part for signature validation AuthData []byte `cbor:"authData"` // The format of the Attestation data. Format string `cbor:"fmt"` // The attestation statement data sent back if attestation is requested. AttStatement map[string]interface{} `cbor:"attStmt,omitempty"` }
func (*AttestationObject) Unmarshal ¶
func (obj *AttestationObject) Unmarshal(rawBytes []byte) error
type AttestationService ¶
type AttestationService struct { // Apple’s App Attest root certificate file path PathForRootCA string // App Identifier (format: teamID + "." + bundleID) AppID string }
func (*AttestationService) Verify ¶
func (service *AttestationService) Verify(attestObj *AttestationObject, clientDataHash, keyID []byte) (*Result, error)
Verify validate a single attestation object and return result object.
type AttestedCredential ¶
type AuthenticatorData ¶
type AuthenticatorData struct { RPIDHash []byte Flags byte Counter uint32 CredentialData AttestedCredential }
func (*AuthenticatorData) HasAttestedCredentialData ¶
func (auth *AuthenticatorData) HasAttestedCredentialData() bool
func (*AuthenticatorData) Unmarshal ¶
func (auth *AuthenticatorData) Unmarshal(rawBytes []byte) error
type Environment ¶
type Environment int
const ( None = 0 Development Environment = 1 // the App Attest sandbox environment. Production Environment = 2 // The App Attest production environment. )
attestation envirom
func (Environment) String ¶
func (e Environment) String() string
Click to show internal directories.
Click to hide internal directories.