auth

package
v0.0.0-...-337a1ab Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application interface {
	Challenge(ctx context.Context, in *ChallengeInput) (*ChallengeOutput, error)
	Authorize(ctx context.Context, in *AuthorizeInput) (*AuthorizeOutput, error)
}

func NewApplication

func NewApplication(core *application.Core) Application

type AuthorizeInput

type AuthorizeInput struct {
	*application.AddressHexInput
	SigHex string
}

func NewAuthorizeInput

func NewAuthorizeInput(addressHex, sigHex string) *AuthorizeInput

func (*AuthorizeInput) Signature

func (in *AuthorizeInput) Signature() domain.Signature

func (*AuthorizeInput) Validate

func (in *AuthorizeInput) Validate() error

type AuthorizeOutput

type AuthorizeOutput struct {
	Token string `json:"token"`
}

func NewAuthorizeOutput

func NewAuthorizeOutput(token string) *AuthorizeOutput

type ChallengeInput

type ChallengeInput struct {
	*application.AddressHexInput
}

func NewChallengeInput

func NewChallengeInput(addressHex string) *ChallengeInput

type ChallengeOutput

type ChallengeOutput struct {
	Challenge string `json:"challenge"`
}

func NewChallengeOutput

func NewChallengeOutput(challenge string) *ChallengeOutput

Jump to

Keyboard shortcuts

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