response

package
v0.0.0-...-7527e3a Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2018 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticatorSelection

type AuthenticatorSelection struct {
	AuthenticatorAttachment string `json:"authenticatorAttachment"`
	RequireResidentKey      bool   `json:"requireResidentKey"`
	UserVerification        string `json:"userVerification"`
}

AuthenticatorSelection denotes specific requests of the authenticator

type CredentialActionResponse

type CredentialActionResponse struct {
	Success    bool              `json:"success"`
	Credential models.Credential `json:"credential, omitempty"`
}

CredentialActionResponse shows the minted credential and success result

type CredentialParameter

type CredentialParameter struct {
	Type      string `json:"type,omitempty"`
	Algorithm string `json:"alg,omitempty"`
}

CredentialParameter is the credential type and alg being requested

type Extensions

type Extensions struct {
	Extensions bool `json:"exts"`
}

The Boolean value true to indicate that an extension is requested by the Relying Party This is currently in development

type FormattedCredential

type FormattedCredential struct {
	CreateDate string `json:"create_date"`
	CredID     string `json:"id"`
	CredType   string `json:"type"`
	PubKeyType string `json:"pk_type"`
	PubKeyX    string `json:"pk_x"`
	PubKeyY    string `json:"pk_y"`
}

FormattedCredential struct for user viewing

func FormatCredentials

func FormatCredentials(creds []models.Credential) ([]FormattedCredential, error)

FormatCredentials creates the formatted credential for viewing

type MakeCredentialResponse

type MakeCredentialResponse struct {
	Challenge              []byte                 `json:"challenge"`
	RP                     MakeOptionRelyingParty `json:"rp"`
	User                   MakeOptionUser         `json:"user"`
	Parameters             []CredentialParameter  `json:"pubKeyCredParams,omitempty"`
	AuthenticatorSelection AuthenticatorSelection `json:"authenticatorSelection,omitempty"`
	Timeout                int                    `json:"timeout,omitempty"`
	ExcludeList            []string               `json:"excludeCredentials,omitempty"`
	Extensions             Extensions             `json:"extenstions,omitempty"`
	AttestationType        string                 `json:"attestation,omitempty"`
}

MakeCredentialResponse The response payload provided on the request of a new credential

type MakeOptionRelyingParty

type MakeOptionRelyingParty struct {
	Name string `json:"name,omitempty"`
	ID   string `json:"id,omitempty"`
}

MakeOptionRelyingParty is the relying party requesting the credential

type MakeOptionUser

type MakeOptionUser struct {
	Name        string `json:"name,omitempty"`
	DisplayName string `json:"displayName,omitempty"`
	Icon        string `json:"icon,omitempty"`
	ID          int64  `json:"id,omitempty"`
}

MakeOptionUser is the user requesting the credential

Jump to

Keyboard shortcuts

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