middleware

package
v0.6.26-beta.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidToken is returned when the token is invalid
	ErrInvalidToken = fmt.Errorf("invalid token")
)

Functions

This section is empty.

Types

type QueryOptions

type QueryOptions struct {
	// contains filtered or unexported fields
}

func ParseQuery

func ParseQuery(c *fiber.Ctx) *QueryOptions

func (*QueryOptions) Address

func (q *QueryOptions) Address() string

func (*QueryOptions) Alias

func (q *QueryOptions) Alias() string

func (*QueryOptions) Assertion

func (q *QueryOptions) Assertion() string

func (*QueryOptions) Attestion

func (q *QueryOptions) Attestion() string

func (*QueryOptions) Challenge added in v0.6.24

func (q *QueryOptions) Challenge() string

func (*QueryOptions) DID

func (q *QueryOptions) DID() string

func (*QueryOptions) GetDID

func (q *QueryOptions) GetDID() (*idtypes.DidDocument, error)

func (*QueryOptions) GetService

func (q *QueryOptions) GetService() (*srvtypes.ServiceRecord, error)

func (*QueryOptions) GetWalletClaims added in v0.6.24

func (q *QueryOptions) GetWalletClaims() (identity.WalletClaims, error)

func (*QueryOptions) HasAddress

func (q *QueryOptions) HasAddress() bool

func (*QueryOptions) HasAlias

func (q *QueryOptions) HasAlias() bool

func (*QueryOptions) HasAssertion

func (q *QueryOptions) HasAssertion() bool

func (*QueryOptions) HasAttestion

func (q *QueryOptions) HasAttestion() bool

func (*QueryOptions) HasChallenge added in v0.6.24

func (q *QueryOptions) HasChallenge() bool

func (*QueryOptions) HasDID

func (q *QueryOptions) HasDID() bool

func (*QueryOptions) HasOrigin

func (q *QueryOptions) HasOrigin() bool

func (*QueryOptions) HasQuery

func (q *QueryOptions) HasQuery() bool

func (*QueryOptions) HasUCWID added in v0.6.24

func (q *QueryOptions) HasUCWID() bool

func (*QueryOptions) IsMobile added in v0.6.17

func (q *QueryOptions) IsMobile() bool

func (*QueryOptions) Origin

func (q *QueryOptions) Origin() string

func (*QueryOptions) UCWID added in v0.6.24

func (q *QueryOptions) UCWID() uint64

type User

type User struct {
	// DID of the user
	Did string `json:"_id"`

	// DID document of the primary identity
	Username string `json:"username"`

	Accounts []*v1.AccountInfo `json:"accounts"`

	// Controller
	identity.Controller
}

func FetchUser

func FetchUser(c *fiber.Ctx) (*User, error)

func NewUser

func NewUser(c identity.Controller, username string) *User

func (*User) JWT

func (u *User) JWT() (string, error)

func (*User) JWTClaims

func (u *User) JWTClaims() jwt.MapClaims

func (*User) ListAccounts

func (u *User) ListAccounts() ([]*v1.AccountInfo, error)

func (*User) PrimaryIdentity

func (u *User) PrimaryIdentity() (*types.DidDocument, error)

Jump to

Keyboard shortcuts

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