user

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StoreName is the name of the user store.
	StoreName = "edgeagent_users"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

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

Store stores Users.

func NewStore

func NewStore(p ariesstorage.Provider) (*Store, error)

NewStore returns a new user Store.

func (*Store) Get

func (s *Store) Get(sub string) (*User, error)

Get the User with the given 'sub'.

func (*Store) Save

func (s *Store) Save(u *User) error

Save this user with the user's 'sub' as the key.

type User

type User struct {
	Sub         string `json:"sub"`
	Name        string `json:"name"`
	GivenName   string `json:"given_name"`
	FamilyName  string `json:"family_name"`
	Email       string `json:"email"`
	SecretShare string `json:"secretShare"`
}

User is a user of the wallet. The user attributes are based on standard OIDC claims: https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims.

func ParseIDToken

func ParseIDToken(t oidc.Claimer) (*User, error)

ParseIDToken parses a User from an IDToken.

Jump to

Keyboard shortcuts

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