auth

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorAuthFailed is a generic authentication failed - but not because of
	// some system failure on our behalf (i.e. HTTP 5xx), more detail is not
	// given
	ErrorAuthFailed = errors.New("Authentication failed")
)

Functions

func HashedSecret

func HashedSecret(ta *Token, salt string) (string, error)

HashedSecret generates a hashed password for an external initiator authentication

Types

type Token

type Token struct {
	AccessKey string `json:"accessKey"`
	Secret    string `json:"secret"`
}

Token is used for API authentication.

func NewToken

func NewToken() *Token

NewToken returns a new Authentication Token.

func (*Token) GetID

func (ta *Token) GetID() string

GetID returns the ID of this structure for jsonapi serialization.

func (*Token) GetName

func (ta *Token) GetName() string

GetName returns the pluralized "type" of this structure for jsonapi serialization.

func (*Token) SetID

func (ta *Token) SetID(id string) error

SetID returns the ID of this structure for jsonapi serialization.

Jump to

Keyboard shortcuts

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