common

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2023 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExtensionAppID        = "appid"
	ExtensionAppIDExclude = "appidExclude"
)

Variables

View Source
var (
	ErrInvalidLengthData        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowData          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupData = fmt.Errorf("proto: unexpected end of group")
)
View Source
var CoinType_name = map[int32]string{
	0:   "CoinType_BITCOIN",
	1:   "CoinType_TESTNET",
	2:   "CoinType_LITECOIN",
	3:   "CoinType_DOGE",
	60:  "CoinType_ETHEREUM",
	703: "CoinType_SONR",
}
View Source
var CoinType_value = map[string]int32{
	"CoinType_BITCOIN":  0,
	"CoinType_TESTNET":  1,
	"CoinType_LITECOIN": 2,
	"CoinType_DOGE":     3,
	"CoinType_ETHEREUM": 60,
	"CoinType_SONR":     703,
}
View Source
var PeerType_name = map[int32]string{
	0: "UNKNOWN",
	1: "HIGHWAY",
	2: "MOTOR",
	3: "VALIDATOR",
	4: "THIRD_PARTY",
}
View Source
var PeerType_value = map[string]int32{
	"UNKNOWN":     0,
	"HIGHWAY":     1,
	"MOTOR":       2,
	"VALIDATOR":   3,
	"THIRD_PARTY": 4,
}

Functions

func ConvertBoolToString

func ConvertBoolToString(v bool) string

func ConvertStringToBool

func ConvertStringToBool(v string) bool

Types

type AuthenticationExtensionsClientOutputs

type AuthenticationExtensionsClientOutputs map[string]interface{}

type CoinType added in v0.3.0

type CoinType int32
const (
	CoinType_CoinType_BITCOIN  CoinType = 0
	CoinType_CoinType_TESTNET  CoinType = 1
	CoinType_CoinType_LITECOIN CoinType = 2
	CoinType_CoinType_DOGE     CoinType = 3
	CoinType_CoinType_ETHEREUM CoinType = 60
	CoinType_CoinType_SONR     CoinType = 703
)

func CoinTypeFromIndex added in v0.3.0

func CoinTypeFromIndex(i int32) CoinType

func CoinTypeFromString added in v0.3.0

func CoinTypeFromString(str string) CoinType

func (CoinType) AddrPrefix added in v0.3.0

func (ct CoinType) AddrPrefix() string

AddrPrefix returns the address prefix for the given coin type.

func (CoinType) EnumDescriptor added in v0.3.0

func (CoinType) EnumDescriptor() ([]byte, []int)

func (CoinType) Index added in v0.3.0

func (ct CoinType) Index() int

Index returns the index for the given coin type.

func (CoinType) Name added in v0.3.0

func (ct CoinType) Name() string

Name returns the name for the given coin type.

func (CoinType) PathComponent added in v0.3.0

func (ct CoinType) PathComponent() uint32

PathComponent returns the path component for the given coin type.

func (CoinType) String added in v0.3.0

func (x CoinType) String() string

func (CoinType) Symbol added in v0.3.0

func (ct CoinType) Symbol() string

Symbol returns the symbol for the given coin type.

type Context added in v0.3.0

type Context struct {
	Ctx           context.Context
	ClientContext client.Context
	HomeDir       string
	RepoPath      string
	NodeRESTUri   string
	NodeGRPCUri   string
	NodeFaucetUri string
	Rendevouz     string
	BsMultiaddrs  []string
	// contains filtered or unexported fields
}

`Context` is a struct that contains the information needed to run the `go-ipfs` node. @property {string} HomeDir - The home directory of the user running the application. @property {string} RepoPath - The path to the IPFS repo. @property {string} NodeRESTUri - The REST endpoint of the node. @property {string} NodeGRPCUri - The GRPC endpoint of the node. @property {string} NodeFaucetUri - The URI of the faucet service. @property {string} Rendevouz - The rendevouz point for the swarm. @property {[]string} BsMultiaddrs - The bootstrap multiaddrs. @property encPubKey - The public key of the encryption key pair. @property encPrivKey - The private key used to encrypt the data.

func NewContext added in v0.3.0

func NewContext(c context.Context) (*Context, error)

NewContext creates a new context object, initializes the encryption keys, and returns the context object

func (*Context) DecryptMessage added in v0.3.0

func (b *Context) DecryptMessage(encMsg []byte, peerPk []byte) ([]byte, bool)

The recipient can decrypt the message using their private key and the sender's public key. When you decrypt, you must use the same nonce you used to encrypt the message. One way to achieve this is to store the nonce alongside the encrypted message. Above, we stored the nonce in the first 24 bytes of the encrypted text.

func (*Context) EncryptMessage added in v0.3.0

func (b *Context) EncryptMessage(msg []byte, peerPk []byte) []byte

Write encrypts a message using the box algorithm This encrypts msg and appends the result to the nonce.

func (*Context) WrapClientContext added in v0.3.0

func (ctx *Context) WrapClientContext(c client.Context) *Context

SetClientContext sets the client context

type DIDConfig added in v0.3.0

type DIDConfig struct {
	// Method is the DID method name
	Method string `json:"method"`

	// Network is the DID network name
	Network string `json:"network"`

	// Identifier is the DID identifier
	Identifier string `json:"identifier"`

	// Path is the DID path
	Path string `json:"path"`

	// Fragment is the DID fragment
	Fragment string `json:"fragment"`
}

func DefaultDidUriConfig added in v0.3.0

func DefaultDidUriConfig() *DIDConfig

DefaultDidUriConfig returns a new DID URI config with default values

func (*DIDConfig) Apply added in v0.3.0

func (c *DIDConfig) Apply(opts ...DIDOption) string

Apply applies the options and returns a constructed valid DID URI

type DIDOption added in v0.3.0

type DIDOption func(*DIDConfig)

DIDOption is a function that configures a DID URI config

func WithFragment added in v0.3.0

func WithFragment(fragment string) DIDOption

WithFragment sets the DID fragment

func WithIdentifier added in v0.3.0

func WithIdentifier(identifier string) DIDOption

WithIdentifier sets the DID identifier

func WithMethod added in v0.3.0

func WithMethod(method string) DIDOption

WithMethod sets the DID method name

func WithNetwork added in v0.3.0

func WithNetwork(network string) DIDOption

WithNetwork sets the DID network name

func WithPath added in v0.3.0

func WithPath(path string) DIDOption

WithPath sets the DID path

type IPFSNode added in v0.3.0

type IPFSNode interface {
	Node

	// Get the IPFS Core API
	CoreAPI() icore.CoreAPI

	// Add a file to the network
	Add(data []byte) (string, error)

	// AddEncrypted adds a file to the network, encrypted with the given public key.
	Encrypt(file []byte, pubKey []byte) []byte

	// AddPath adds a file to the network
	AddPath(path string) (string, error)

	// Get a file from the network
	Get(hash string) ([]byte, error)

	// GetDecrypted takes a cid and a public key and returns the decrypted file.
	Decrypt(bz []byte, pubKey []byte) ([]byte, bool)

	// GetPath gets a file from the network
	GetPath(hash string) (map[string]files.Node, error)

	// It's returning a DocumentStore for the given username.
	LoadDocsStore(username string) (iface.DocumentStore, error)

	// It's returning a DocumentStore for the given username.
	LoadEventLogStore(username string) (iface.EventLogStore, error)

	// It's returning a KeyValueStore for the given username.
	LoadKeyValueStore(username string) (iface.KeyValueStore, error)
}

`IPFSNode` is an interface that defines the methods that a Highway node must implement. @property Add - This is the function that adds a file to the IPFS network. @property {error} Connect - Connects to a peer @property CoreAPI - This is the IPFS Core API. @property Get - Get a file from the network @property {string} MultiAddr - The multiaddr of the node @property PeerID - The peer ID of the node @property GetDecrypted - This is a method that takes a cid and a public key and returns the decrypted file. @property AddEncrypted - Add a file to the network, encrypted with the given public key.

type KeyPrint

type KeyPrint struct {
	Address          string              `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	BiometricKey     []byte              `protobuf:"bytes,2,opt,name=biometric_key,json=biometricKey,proto3" json:"biometric_key,omitempty"`
	BiometricKeyType string              `protobuf:"bytes,3,opt,name=biometric_key_type,json=biometricKeyType,proto3" json:"biometric_key_type,omitempty"`
	WebauthnKey      *WebauthnCredential `protobuf:"bytes,4,opt,name=webauthn_key,json=webauthnKey,proto3" json:"webauthn_key,omitempty"`
	DeviceLabel      string              `protobuf:"bytes,5,opt,name=device_label,json=deviceLabel,proto3" json:"device_label,omitempty"`
}

KeyPrint is a object used by Motor clients to store key print information in Biometric storage or Webauthn

func (*KeyPrint) Descriptor

func (*KeyPrint) Descriptor() ([]byte, []int)

func (*KeyPrint) GetAddress

func (m *KeyPrint) GetAddress() string

func (*KeyPrint) GetBiometricKey

func (m *KeyPrint) GetBiometricKey() []byte

func (*KeyPrint) GetBiometricKeyType

func (m *KeyPrint) GetBiometricKeyType() string

func (*KeyPrint) GetDeviceLabel

func (m *KeyPrint) GetDeviceLabel() string

func (*KeyPrint) GetWebauthnKey

func (m *KeyPrint) GetWebauthnKey() *WebauthnCredential

func (*KeyPrint) Marshal

func (m *KeyPrint) Marshal() (dAtA []byte, err error)

func (*KeyPrint) MarshalTo

func (m *KeyPrint) MarshalTo(dAtA []byte) (int, error)

func (*KeyPrint) MarshalToSizedBuffer

func (m *KeyPrint) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*KeyPrint) ProtoMessage

func (*KeyPrint) ProtoMessage()

func (*KeyPrint) Reset

func (m *KeyPrint) Reset()

func (*KeyPrint) Size

func (m *KeyPrint) Size() (n int)

func (*KeyPrint) String

func (m *KeyPrint) String() string

func (*KeyPrint) Unmarshal

func (m *KeyPrint) Unmarshal(dAtA []byte) error

func (*KeyPrint) XXX_DiscardUnknown

func (m *KeyPrint) XXX_DiscardUnknown()

func (*KeyPrint) XXX_Marshal

func (m *KeyPrint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*KeyPrint) XXX_Merge

func (m *KeyPrint) XXX_Merge(src proto.Message)

func (*KeyPrint) XXX_Size

func (m *KeyPrint) XXX_Size() int

func (*KeyPrint) XXX_Unmarshal

func (m *KeyPrint) XXX_Unmarshal(b []byte) error

type Node added in v0.3.0

type Node interface {
	// Context returns protocol.Context
	Context() *Context

	WrapClientContext(c client.Context) *Context

	// PeerID returns the peer ID of the node
	PeerID() peer.ID

	// Connect to a peer
	Connect(peers ...string) error

	// MultiAddrs returns the multiaddr of the node
	MultiAddrs() string

	// Close the node
	Close() error
}

`Node` is an interface that defines the methods that a node must implement to be used by the Motor library. @property PeerID - The peer ID of the node. @property {error} Connect - Connect to a peer @property {string} MultiAddrs - The multiaddr of the node @property {error} Close - Close the node

type NodeCallback

type NodeCallback interface {
	OnDiscover(data []byte)
	OnLinking(data []byte)
}

NodeCallback is an interface with three methods: OnDiscover, OnLinking, and OnTopicMessage. @property OnDiscover - This is called when a node is discovered. The data is the data that was sent by the node. @property OnLinking - This is called when a node is linking to the gateway. @property OnTopicMessage - This is the callback that will be called when a message is received on a topic.

func DefaultCallback

func DefaultCallback() NodeCallback

It returns a pointer to a defaultCallback struct

type P2PNode added in v0.3.0

type P2PNode interface {
	Node

	// NewStream creates a new stream to a peer
	NewStream(to peer.ID, protocol protocol.ID, msg proto.Message) error

	// SetStreamHandler sets the handler for a given protocol
	SetStreamHandler(protocol protocol.ID, handler network.StreamHandler)

	// Publish a message to a topic
	Publish(topic string, message []byte, opts ...ps.TopicOpt) error

	// Subscribe to a topic
	Subscribe(topic string, handlers ...func(msg *ps.Message)) (*ps.Subscription, error)
}

`P2PNode` is an interface that defines the methods that a node must implement to be used by the Motor library. @property PeerID - The peer ID of the node. @property {error} Connect - Connect to a peer @property {string} MultiAddrs - The multiaddresses of the node. @property {error} NewStream - This is the function that allows you to create a new stream to a peer. @property {error} Publish - Publish a message to a topic. @property SetStreamHandler - This is a function that sets the handler for a given protocol. @property Subscribe - Subscribe to a topic. @property {error} Close - Closes the node.

type PeerInfo

type PeerInfo struct {
	Id        string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name      string   `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	PeerId    string   `protobuf:"bytes,3,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty"`
	Multiaddr string   `protobuf:"bytes,4,opt,name=multiaddr,proto3" json:"multiaddr,omitempty"`
	Type      PeerType `protobuf:"varint,5,opt,name=type,proto3,enum=sonrhq.common.v1.PeerType" json:"type,omitempty"`
}

Basic Info Sent to Peers to Establish Connections

func (*PeerInfo) Descriptor

func (*PeerInfo) Descriptor() ([]byte, []int)

func (*PeerInfo) GetId

func (m *PeerInfo) GetId() string

func (*PeerInfo) GetMultiaddr

func (m *PeerInfo) GetMultiaddr() string

func (*PeerInfo) GetName

func (m *PeerInfo) GetName() string

func (*PeerInfo) GetPeerId

func (m *PeerInfo) GetPeerId() string

func (*PeerInfo) GetType

func (m *PeerInfo) GetType() PeerType

func (*PeerInfo) Marshal

func (m *PeerInfo) Marshal() (dAtA []byte, err error)

func (*PeerInfo) MarshalTo

func (m *PeerInfo) MarshalTo(dAtA []byte) (int, error)

func (*PeerInfo) MarshalToSizedBuffer

func (m *PeerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*PeerInfo) ProtoMessage

func (*PeerInfo) ProtoMessage()

func (*PeerInfo) Reset

func (m *PeerInfo) Reset()

func (*PeerInfo) Size

func (m *PeerInfo) Size() (n int)

func (*PeerInfo) String

func (m *PeerInfo) String() string

func (*PeerInfo) Unmarshal

func (m *PeerInfo) Unmarshal(dAtA []byte) error

func (*PeerInfo) XXX_DiscardUnknown

func (m *PeerInfo) XXX_DiscardUnknown()

func (*PeerInfo) XXX_Marshal

func (m *PeerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PeerInfo) XXX_Merge

func (m *PeerInfo) XXX_Merge(src proto.Message)

func (*PeerInfo) XXX_Size

func (m *PeerInfo) XXX_Size() int

func (*PeerInfo) XXX_Unmarshal

func (m *PeerInfo) XXX_Unmarshal(b []byte) error

type PeerType

type PeerType int32

Peers Active Type

const (
	PeerType_UNKNOWN     PeerType = 0
	PeerType_HIGHWAY     PeerType = 1
	PeerType_MOTOR       PeerType = 2
	PeerType_VALIDATOR   PeerType = 3
	PeerType_THIRD_PARTY PeerType = 4
)

func (PeerType) EnumDescriptor

func (PeerType) EnumDescriptor() ([]byte, []int)

func (PeerType) String

func (x PeerType) String() string

type SNRPubKey added in v0.3.0

type SNRPubKey interface {
	cryptotypes.PubKey

	Bech32(pfix string) (string, error)
	DID(opts ...DIDOption) string
	Multibase() string
	Raw() []byte
}

`SNRPubKey` is a `PubKey` that has a `DID` and a `Multibase` @property {string} DID - The DID of the SNR @property {string} Multibase - The multibase encoding of the DID.

type WebauthnAuthenticator

type WebauthnAuthenticator struct {
	// The AAGUID of the authenticator. An AAGUID is defined as an array containing the globally unique
	// identifier of the authenticator model being sought.
	Aaguid []byte `protobuf:"bytes,1,opt,name=aaguid,proto3" json:"aaguid,omitempty"`
	// SignCount -Upon a new login operation, the Relying Party compares the stored signature counter value
	// with the new signCount value returned in the assertion’s authenticator data. If this new
	// signCount value is less than or equal to the stored value, a cloned authenticator may
	// exist, or the authenticator may be malfunctioning.
	SignCount uint32 `protobuf:"varint,2,opt,name=sign_count,json=signCount,proto3" json:"sign_count,omitempty"`
	// CloneWarning - This is a signal that the authenticator may be cloned, i.e. at least two copies of the
	// credential private key may exist and are being used in parallel. Relying Parties should incorporate
	// this information into their risk scoring. Whether the Relying Party updates the stored signature
	// counter value in this case, or not, or fails the authentication ceremony or not, is Relying Party-specific.
	CloneWarning bool `protobuf:"varint,3,opt,name=clone_warning,json=cloneWarning,proto3" json:"clone_warning,omitempty"`
}

WebauthnAuthenticator contains certificate information about a WebAuthn authenticator

func (*WebauthnAuthenticator) Descriptor

func (*WebauthnAuthenticator) Descriptor() ([]byte, []int)

func (*WebauthnAuthenticator) GetAaguid

func (m *WebauthnAuthenticator) GetAaguid() []byte

func (*WebauthnAuthenticator) GetCloneWarning

func (m *WebauthnAuthenticator) GetCloneWarning() bool

func (*WebauthnAuthenticator) GetSignCount

func (m *WebauthnAuthenticator) GetSignCount() uint32

func (*WebauthnAuthenticator) Marshal

func (m *WebauthnAuthenticator) Marshal() (dAtA []byte, err error)

func (*WebauthnAuthenticator) MarshalTo

func (m *WebauthnAuthenticator) MarshalTo(dAtA []byte) (int, error)

func (*WebauthnAuthenticator) MarshalToSizedBuffer

func (m *WebauthnAuthenticator) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*WebauthnAuthenticator) ProtoMessage

func (*WebauthnAuthenticator) ProtoMessage()

func (*WebauthnAuthenticator) Reset

func (m *WebauthnAuthenticator) Reset()

func (*WebauthnAuthenticator) Size

func (m *WebauthnAuthenticator) Size() (n int)

func (*WebauthnAuthenticator) String

func (m *WebauthnAuthenticator) String() string

func (*WebauthnAuthenticator) Unmarshal

func (m *WebauthnAuthenticator) Unmarshal(dAtA []byte) error

func (*WebauthnAuthenticator) UpdateCounter

func (a *WebauthnAuthenticator) UpdateCounter(authDataCount uint32)

VerifyCounter Step 17 of §7.2. about verifying attestation. If the signature counter value authData.signCount is nonzero or the value stored in conjunction with credential’s id attribute is nonzero, then run the following sub-step:

If the signature counter value authData.signCount is

→ Greater than the signature counter value stored in conjunction with credential’s id attribute.
Update the stored signature counter value, associated with credential’s id attribute, to be the value of
authData.signCount.

→ Less than or equal to the signature counter value stored in conjunction with credential’s id attribute.
This is a signal that the authenticator may be cloned, see CloneWarning above for more information.

func (*WebauthnAuthenticator) XXX_DiscardUnknown

func (m *WebauthnAuthenticator) XXX_DiscardUnknown()

func (*WebauthnAuthenticator) XXX_Marshal

func (m *WebauthnAuthenticator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WebauthnAuthenticator) XXX_Merge

func (m *WebauthnAuthenticator) XXX_Merge(src proto.Message)

func (*WebauthnAuthenticator) XXX_Size

func (m *WebauthnAuthenticator) XXX_Size() int

func (*WebauthnAuthenticator) XXX_Unmarshal

func (m *WebauthnAuthenticator) XXX_Unmarshal(b []byte) error

type WebauthnCredential

type WebauthnCredential struct {
	// A probabilistically-unique byte sequence identifying a public key credential source and its authentication assertions.
	Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	// The public key portion of a Relying Party-specific credential key pair, generated by an authenticator and returned to
	// a Relying Party at registration time (see also public key credential). The private key portion of the credential key
	// pair is known as the credential private key. Note that in the case of self attestation, the credential key pair is also
	// used as the attestation key pair, see self attestation for details.
	PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// The attestation format used (if any) by the authenticator when creating the credential.
	AttestationType string `protobuf:"bytes,3,opt,name=attestation_type,json=attestationType,proto3" json:"attestation_type,omitempty"`
	// The transports used by the authenticator when creating the credential.
	Transport []string `protobuf:"bytes,4,rep,name=transport,proto3" json:"transport,omitempty"`
	// The Authenticator information for a given certificate
	Authenticator *WebauthnAuthenticator `protobuf:"bytes,5,opt,name=authenticator,proto3" json:"authenticator,omitempty"`
}

WebauthnCredential contains all needed information about a WebAuthn credential for storage

func ConvertStdCredential

func ConvertStdCredential(wa *webauthn.Credential) *WebauthnCredential

ConvertStdCredential creates a common.WebauthnCredential from a webauthn.Credential from the go-webauthn package

func NewWebAuthnCredential

func NewWebAuthnCredential(c *protocol.ParsedCredentialCreationData) *WebauthnCredential

NewWebAuthnCredential creates a new WebauthnCredential from a ParsedCredentialCreationData and contains all needed information about a WebAuthn credential for storage. This is then used to create a VerificationMethod for the DID Document.

func (*WebauthnCredential) Descriptor

func (*WebauthnCredential) Descriptor() ([]byte, []int)

func (*WebauthnCredential) Did

func (c *WebauthnCredential) Did() string

Did returns the DID for a WebauthnCredential

func (*WebauthnCredential) FromMetadata added in v0.3.0

func (c *WebauthnCredential) FromMetadata(m map[string]string) error

FromMetadata converts a map[string]string into a common WebauthnCredential

func (*WebauthnCredential) GetAttestationType

func (m *WebauthnCredential) GetAttestationType() string

func (*WebauthnCredential) GetAuthenticator

func (m *WebauthnCredential) GetAuthenticator() *WebauthnAuthenticator

func (*WebauthnCredential) GetId

func (m *WebauthnCredential) GetId() []byte

func (*WebauthnCredential) GetPublicKey

func (m *WebauthnCredential) GetPublicKey() []byte

func (*WebauthnCredential) GetTransport

func (m *WebauthnCredential) GetTransport() []string

func (*WebauthnCredential) Marshal

func (m *WebauthnCredential) Marshal() (dAtA []byte, err error)

func (*WebauthnCredential) MarshalTo

func (m *WebauthnCredential) MarshalTo(dAtA []byte) (int, error)

func (*WebauthnCredential) MarshalToSizedBuffer

func (m *WebauthnCredential) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*WebauthnCredential) ProtoMessage

func (*WebauthnCredential) ProtoMessage()

func (*WebauthnCredential) PublicKeyMultibase

func (c *WebauthnCredential) PublicKeyMultibase() string

PublicKeyMultibase returns the public key in multibase format

func (*WebauthnCredential) Reset

func (m *WebauthnCredential) Reset()

func (*WebauthnCredential) Size

func (m *WebauthnCredential) Size() (n int)

func (*WebauthnCredential) String

func (m *WebauthnCredential) String() string

func (*WebauthnCredential) ToMetadata

func (c *WebauthnCredential) ToMetadata() map[string]string

ToMetadata converts a common WebauthnCredential into a map[string]string

func (*WebauthnCredential) ToStdCredential

func (c *WebauthnCredential) ToStdCredential() *webauthn.Credential

ToStdCredential converts a common WebauthnCredential to one that can be used for the go-webauthn package

func (*WebauthnCredential) Unmarshal

func (m *WebauthnCredential) Unmarshal(dAtA []byte) error

func (*WebauthnCredential) Validate

func (c *WebauthnCredential) Validate(pc *webauthn.Credential) error

Validate verifies that this WebauthnCredential is identical to the go-webauthn package credential

func (*WebauthnCredential) XXX_DiscardUnknown

func (m *WebauthnCredential) XXX_DiscardUnknown()

func (*WebauthnCredential) XXX_Marshal

func (m *WebauthnCredential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*WebauthnCredential) XXX_Merge

func (m *WebauthnCredential) XXX_Merge(src proto.Message)

func (*WebauthnCredential) XXX_Size

func (m *WebauthnCredential) XXX_Size() int

func (*WebauthnCredential) XXX_Unmarshal

func (m *WebauthnCredential) XXX_Unmarshal(b []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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