native

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: GPL-3.0 Imports: 18 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAuthTokenHandler

func NewAuthTokenHandler() *authTokenHandler

NewAuthTokenHandler returns a new instance of a native authentication token handler

func NewNativeAuthClient

func NewNativeAuthClient(args ArgsNativeAuthClient) (*authClient, error)

NewNativeAuthClient will create a new native client able to create authentication tokens

func NewNativeAuthServer

func NewNativeAuthServer(args ArgsNativeAuthServer) (*authServer, error)

NewNativeAuthServer returns a native authentication server that verifies authentication tokens: 1. Checks whether the provided signature from tokens corresponds with the provided address for the provided body 2. Checks the token expiration status

Types

type ArgsNativeAuthClient

type ArgsNativeAuthClient struct {
	Signer                 builders.Signer
	ExtraInfo              struct{}
	Proxy                  workflows.ProxyHandler
	CryptoComponentsHolder core.CryptoComponentsHolder
	TokenHandler           authentication.AuthTokenHandler
	TokenExpiryInSeconds   int64
	Host                   string
}

ArgsNativeAuthClient is the DTO used in the native auth client constructor

type ArgsNativeAuthServer

type ArgsNativeAuthServer struct {
	HttpClientWrapper authentication.HttpClientWrapper
	TokenHandler      authentication.AuthTokenHandler
	Signer            builders.Signer
	PubKeyConverter   core.PubkeyConverter
	KeyGenerator      crypto.KeyGenerator
	TimestampsCacher  storage.Cacher
}

ArgsNativeAuthServer is the DTO used in the native auth server constructor

type AuthToken

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

AuthToken is the native authentication token implementation

func (*AuthToken) GetAddress

func (token *AuthToken) GetAddress() []byte

GetAddress is the getter to address member

func (*AuthToken) GetBlockHash

func (token *AuthToken) GetBlockHash() string

GetBlockHash is the getter to blockHash member

func (*AuthToken) GetExtraInfo

func (token *AuthToken) GetExtraInfo() []byte

GetExtraInfo is the getter to extraInfo member

func (*AuthToken) GetHost

func (token *AuthToken) GetHost() []byte

GetHost is the getter to host member

func (*AuthToken) GetSignature

func (token *AuthToken) GetSignature() []byte

GetSignature is the getter to signature member

func (*AuthToken) GetTtl

func (token *AuthToken) GetTtl() int64

GetTtl is the getter to ttl member

func (*AuthToken) IsInterfaceNil

func (token *AuthToken) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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