client

package
v0.0.0-...-e11dbd8 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DOMAIN_VERIFY_MODE_OFF  = "OFF"
	DOMAIN_VERIFY_MODE_FULL = "FULL"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Claims

type Claims struct {
	Roles []string `json:"roles"`
	jwt.StandardClaims
}

type DWNClient

type DWNClient struct {
	Client           *resty.Client
	Domain           string
	DomainVerifyMode string
	APIVersion       string

	AuthKey                 *ec.Key
	AuthToken               *jwt.Token
	CurrentAuthenticatedDID string

	DWNServiceBaseURL  string
	DIDServiceBaseUrl  string
	AuthServiceBaseUrl string
}

func CreateDWNClient

func CreateDWNClient(authKey *ec.Key, domain string, verifyDomainFlag bool, apiVersion string, optionalConfig map[string]string) (*DWNClient, error)

func (*DWNClient) Authenticate

func (client *DWNClient) Authenticate(asDid string) error

func (*DWNClient) SendMessage

func (client *DWNClient) SendMessage(requestObject *did.RequestObject) error

Jump to

Keyboard shortcuts

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