api

package
v0.0.0-...-756f097 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2018 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssembleSignedRegistrationData

func AssembleSignedRegistrationData(
	rpIDHash,
	tbsHash,
	credID []byte,
	pubKey models.PublicKey,
) ([]byte, error)

func DecodeAttestationObject

func DecodeAttestationObject(rawAttObj string) (req.EncodedAuthData, error)

func JSONResponse

func JSONResponse(w http.ResponseWriter, d interface{}, c int)

func ParseAssertionData

func ParseAssertionData(assertionData []byte, hexSig string) (req.DecodedAssertionData, error)

ParseAssertionData - Parses assertion data from byte array to a struct

func ParseAttestationStatement

func ParseAttestationStatement(
	ead req.EncodedAttestationStatement) (req.DecodedAttestationStatement, error)

ParseAttestationStatement - parse the Attestation Certificate returned by the the authenticator

func ParseAuthData

func ParseAuthData(ead req.EncodedAuthData) (req.DecodedAuthData, error)

ParseAuthData - Parses the AuthData returned from the authenticator from a byte array

func UnmarshallClientData

func UnmarshallClientData(clientData string) (req.DecodedClientData, error)

UnmarshallClientData - Unmarshall the ClientDataJSON provided by the authenticator. It is Base 64 encoded before being sent up to the server, so we b6 decode it first.

func VerifyAssertionData

func VerifyAssertionData(
	clientData *req.DecodedClientData,
	authData *req.DecodedAssertionData,
	sessionData *models.SessionData,
	credentialID string) (bool, models.Credential, error)

VerifyAssertionData - Verifies that the Assertion data provided is correct and valid

func VerifyRegistrationData

func VerifyRegistrationData(
	clientData *req.DecodedClientData,
	authData *req.DecodedAuthData,
	sessionData *models.SessionData) (bool, error)

VerifyRegistrationData - Verify that the provided Authenticator and Client

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL