middleware

package
v0.7.3-beta.3 Latest Latest
Warning

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

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

Documentation

Overview

Class to interact with the underlying blockchain to operate on the highway

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAliasAvailable

func CheckAliasAvailable(email string) (bool, error)

CheckAliasAvailable checks if an alias is already registered

func CheckAliasUnavailable

func CheckAliasUnavailable(email string) (bool, error)

CheckAliasUnavailable checks if an alias is already registered

func GetControllerAccount added in v0.7.1

func GetControllerAccount(address string) (*identitytypes.ControllerAccount, error)

GetDID returns the DIDDocument of a given DID or Alias

func GetDID

func GetDID(alias string) (*identitytypes.DIDDocument, error)

GetDID returns the DIDDocument of a given DID or Alias

func GetEmailRecordCreator added in v0.7.1

func GetEmailRecordCreator(email string) (string, error)

GetEmailRecordCreator returns the creator of a given email

func GetServiceRecord

func GetServiceRecord(origin string) (*servicetypes.ServiceRecord, error)

GetServiceRecord returns the ServiceRecord of a given origin

func IssueCredentialAssertionOptions added in v0.7.1

func IssueCredentialAssertionOptions(email string, record *servicetypes.ServiceRecord) (string, protocol.URLEncodedBase64, string, error)

IssueCredentialAssertionOptions takes a didDocument and serviceRecord in order to create a credential options.

func IssueCredentialAttestationOptions added in v0.7.1

func IssueCredentialAttestationOptions(alias string, record *servicetypes.ServiceRecord) (string, protocol.URLEncodedBase64, error)

IssueCredentialAttestationOptions takes a ucwId alias, and random unclaimed address and returns a token with the credential options.

func IssueEmailAssertionOptions added in v0.7.1

func IssueEmailAssertionOptions(email string, ucwDid string) (string, error)

IssueEmailAssertionOptions takes a didDocument and serviceRecord in order to create a credential options.

func PublishControllerAccount added in v0.7.1

func PublishControllerAccount(alias string, cred *servicetypes.WebauthnCredential, origin string) (*controller.SonrController, *types.TxResponse, error)

func StoreAuthCookies added in v0.7.1

func StoreAuthCookies(c *gin.Context, res *types.AuthenticationResult, origin string) gin.H

The function stores authentication cookies in the context.

func UseControllerAccount added in v0.7.1

func UseControllerAccount(token string) (*controller.SonrController, error)

Types

type ClaimsAPI added in v0.7.1

type ClaimsAPI struct{}

Jump to

Keyboard shortcuts

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