rp

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataRequest

type DataRequest struct {
	Scope []string
	PD    *presexch.PresentationDefinition
}

DataRequest is a request for data by the relying party with the user as subject.

type Store

type Store struct {
	Store storage.Store
}

Store is the RP Adapter's store.

func New

func New(p storage.Provider) (*Store, error)

New returns the Store.

func (*Store) GetRP

func (s *Store) GetRP(clientID string) (*Tenant, error)

GetRP fetches the RP tenant with the given clientID.

func (*Store) GetUserConnection

func (s *Store) GetUserConnection(clientID, userSub string) (*UserConnection, error)

GetUserConnection fetches the connection between the given RP and user.

func (*Store) SaveRP

func (s *Store) SaveRP(rp *Tenant) error

SaveRP saves the RP tenant.

func (*Store) SaveUserConnection

func (s *Store) SaveUserConnection(uc *UserConnection) error

SaveUserConnection saves the user connection.

type Tenant

type Tenant struct {
	ClientID             string
	PublicDID            string
	Label                string
	Scopes               []string
	RequiresBlindedRoute bool
	SupportsWACI         bool
	IsDIDCommV1          bool
	LinkedWalletURL      string
}

Tenant describes the Relying Party.

type User

type User struct {
	Subject string
	DID     string
}

User is an end user.

type UserConnection

type UserConnection struct {
	User    *User
	RP      *Tenant
	Request *DataRequest
}

UserConnection describes a connection a relying party has with a user.

Jump to

Keyboard shortcuts

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