auth

package
v1.0.78 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClientTypeProducer = ClientType(iota + 1)
	ClientTypeConsumer
)

Variables

This section is empty.

Functions

func GetSecurityToken

func GetSecurityToken(accessKey string) string

Types

type ClientType

type ClientType int

func (ClientType) String

func (ct ClientType) String() string

type Identity

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

func NewIdentity

func NewIdentity(name string, group string, clntType ClientType) *Identity

func (*Identity) Credential

func (id *Identity) Credential() (accessKey, securityKey string)

format:

accessKey     = <name> + "|" + <clientType> + "|" + <group>
securityToken = hmac(accessKey, skHashToken)

func (*Identity) Group

func (id *Identity) Group() string

func (*Identity) Name

func (id *Identity) Name() string

func (*Identity) String

func (id *Identity) String() string

func (*Identity) Type

func (id *Identity) Type() ClientType

Jump to

Keyboard shortcuts

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