user

package
v0.2.98 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(certPath, addr string, port int, insecure bool)

func InitWithOpts

func InitWithOpts(certPath, addr string, port int, insecure bool, opts []grpc.DialOption)

Types

type User

type User struct {
	ID            uint64
	Name          string // full email address
	PublicDIDSeed string // seed for the public DID
	DisplayName   string // shortened version of the Name
	DID           string
	//JWT         string // remove this from here and make a method
	Credentials []webauthn.Credential
}

User represents the user model

func New added in v0.2.71

func New(name, displayName, seed string) *User

New creates and returns a new User

func NewFromData added in v0.2.71

func NewFromData(d []byte) *User

func (*User) AddCredential

func (u *User) AddCredential(cred webauthn.Credential)

AddCredential associates the credential to the user

func (*User) AllocateCloudAgent

func (u *User) AllocateCloudAgent(adminID string, timeout time.Duration) (err error)

AllocateCloudAgent allocates new cloud agent from the agency. adminID is part of the security for the current agency ecosystem. It must match what's configured to server side i.e. agency.

func (User) CredentialExcludeList

func (u User) CredentialExcludeList() []protocol.CredentialDescriptor

CredentialExcludeList returns a CredentialDescriptor array filled with all the user's credentials

func (User) Data

func (u User) Data() []byte

func (User) JWT

func (u User) JWT() string

func (User) Key

func (u User) Key() []byte

func (User) WebAuthnCredentials

func (u User) WebAuthnCredentials() []webauthn.Credential

WebAuthnCredentials returns credentials owned by the user

func (User) WebAuthnDisplayName

func (u User) WebAuthnDisplayName() string

WebAuthnDisplayName returns the user's display name

func (User) WebAuthnID

func (u User) WebAuthnID() []byte

WebAuthnID returns the user's ID

func (User) WebAuthnIcon

func (u User) WebAuthnIcon() string

WebAuthnIcon is not (yet) implemented

func (User) WebAuthnName

func (u User) WebAuthnName() string

WebAuthnName returns the user's username

Jump to

Keyboard shortcuts

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