auth

package
v2.10.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 5 Imported by: 1 module, 0 packages

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

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 = pkgerrors.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