signer

package
v0.0.0-...-8c2001a Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrWrongTenant = errors.New("wrong tenant")
)

Functions

This section is empty.

Types

type ClaimSigner

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

func New

func New(key []byte, salt string) *ClaimSigner

func (*ClaimSigner) ParseAdapterEditor

func (cs *ClaimSigner) ParseAdapterEditor(tenantId, payload string) (*claim.AdapterEditor, error)

func (*ClaimSigner) ParseAdviseryTkt

func (cs *ClaimSigner) ParseAdviseryTkt(tenantId, payload string) (*claim.AdviseryTkt, error)

func (*ClaimSigner) ParseAutheFirst

func (cs *ClaimSigner) ParseAutheFirst(tenantId, payload string) (*claim.AuthFirst, error)

func (*ClaimSigner) ParseAutheNext

func (cs *ClaimSigner) ParseAutheNext(tenantId, payload string) (*claim.AuthNext, error)

func (*ClaimSigner) ParseBprintTkt

func (cs *ClaimSigner) ParseBprintTkt(tenantId, payload string) (*claim.BprintTkt, error)

func (*ClaimSigner) ParseData

func (cs *ClaimSigner) ParseData(tenantId, payload string) (*claim.Data, error)

func (*ClaimSigner) ParseExecModTkt

func (cs *ClaimSigner) ParseExecModTkt(tenantId, payload string) (*claim.ExecModTkt, error)

func (*ClaimSigner) ParseExecutor

func (cs *ClaimSigner) ParseExecutor(tenantId, payload string) (*claim.Executor, error)

func (*ClaimSigner) ParseFolder

func (cs *ClaimSigner) ParseFolder(tenantId, payload string) (*claim.Folder, error)

func (*ClaimSigner) ParseOauthState

func (cs *ClaimSigner) ParseOauthState(tenantId, payload string) (*claim.OauthState, error)

func (*ClaimSigner) ParseOperator

func (cs *ClaimSigner) ParseOperator(payload string) (*claim.Operator, error)

func (*ClaimSigner) ParsePlugDevTkt

func (cs *ClaimSigner) ParsePlugDevTkt(tenantId, payload string) (*claim.PlugDevTkt, error)

func (*ClaimSigner) ParsePlugState

func (cs *ClaimSigner) ParsePlugState(tenantId, payload string) (*claim.PlugState, error)

func (*ClaimSigner) ParsePreAuthed

func (cs *ClaimSigner) ParsePreAuthed(tenantId, payload string) (*claim.PreAuthed, error)

func (*ClaimSigner) ParseRoomTagTkt

func (cs *ClaimSigner) ParseRoomTagTkt(tenantId, payload string) (*claim.RoomTagTkt, error)

func (*ClaimSigner) ParseSession

func (cs *ClaimSigner) ParseSession(tenantId, payload string) (*claim.Session, error)

func (*ClaimSigner) ParseSite

func (cs *ClaimSigner) ParseSite(payload string) (*claim.Site, error)

func (*ClaimSigner) ParseSockdTkt

func (cs *ClaimSigner) ParseSockdTkt(tenantId, payload string) (*claim.SockdTkt, error)

func (*ClaimSigner) ParseUser

func (cs *ClaimSigner) ParseUser(tenantId, payload string) (*claim.User, error)

func (*ClaimSigner) ParseUserMgmtTkt

func (cs *ClaimSigner) ParseUserMgmtTkt(tenantId, payload string) (*claim.UserMgmtTkt, error)

func (*ClaimSigner) SignAdapterEditor

func (cs *ClaimSigner) SignAdapterEditor(tenantId string, data *claim.AdapterEditor) (string, error)

func (*ClaimSigner) SignAdviseryTkt

func (cs *ClaimSigner) SignAdviseryTkt(tenantId string, data *claim.AdviseryTkt) (string, error)

func (*ClaimSigner) SignAutheFirst

func (cs *ClaimSigner) SignAutheFirst(tenantId string, data *claim.AuthFirst) (string, error)

func (*ClaimSigner) SignAutheNext

func (cs *ClaimSigner) SignAutheNext(tenantId string, data *claim.AuthNext) (string, error)

func (*ClaimSigner) SignBprintTkt

func (cs *ClaimSigner) SignBprintTkt(tenantId string, data *claim.BprintTkt) (string, error)

func (*ClaimSigner) SignData

func (cs *ClaimSigner) SignData(tenantId string, data *claim.Data) (string, error)

func (*ClaimSigner) SignExecModTkt

func (cs *ClaimSigner) SignExecModTkt(tenantId string, data *claim.ExecModTkt) (string, error)

func (*ClaimSigner) SignExecutor

func (cs *ClaimSigner) SignExecutor(tenantId string, data *claim.Executor) (string, error)

func (*ClaimSigner) SignFolder

func (cs *ClaimSigner) SignFolder(tenantId string, data *claim.Folder) (string, error)

func (*ClaimSigner) SignOauthState

func (cs *ClaimSigner) SignOauthState(tenantId string, data *claim.OauthState) (string, error)

func (*ClaimSigner) SignOperator

func (cs *ClaimSigner) SignOperator(data *claim.Operator) (string, error)

func (*ClaimSigner) SignPlugDevTkt

func (cs *ClaimSigner) SignPlugDevTkt(tenantId string, data *claim.PlugDevTkt) (string, error)

func (*ClaimSigner) SignPlugState

func (cs *ClaimSigner) SignPlugState(tenantId string, data *claim.PlugState) (string, error)

func (*ClaimSigner) SignPreAuthed

func (cs *ClaimSigner) SignPreAuthed(tenantId string, data *claim.PreAuthed) (string, error)

func (*ClaimSigner) SignRoomTagTkt

func (cs *ClaimSigner) SignRoomTagTkt(tenantId string, data *claim.RoomTagTkt) (string, error)

func (*ClaimSigner) SignSession

func (cs *ClaimSigner) SignSession(tenantId string, data *claim.Session) (string, error)

func (*ClaimSigner) SignSite

func (cs *ClaimSigner) SignSite(data *claim.Site) (string, error)

func (*ClaimSigner) SignSockdTkt

func (cs *ClaimSigner) SignSockdTkt(tenantId string, data *claim.SockdTkt) (string, error)

func (*ClaimSigner) SignUser

func (cs *ClaimSigner) SignUser(tenantId string, data *claim.User) (string, error)

func (*ClaimSigner) SignUserMgmtTkt

func (cs *ClaimSigner) SignUserMgmtTkt(tenantId string, data *claim.UserMgmtTkt) (string, error)

type Signer

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

func (*Signer) GlobalParseRaw

func (a *Signer) GlobalParseRaw(token string) (string, error)

func (*Signer) GlobalSignRaw

func (a *Signer) GlobalSignRaw(payload string) (string, error)

func (*Signer) Parse

func (a *Signer) Parse(namespace string, token string, target any) error

caller should verify tenant

func (*Signer) ParseRaw

func (a *Signer) ParseRaw(namespace string, token string) (string, error)

func (*Signer) Sign

func (a *Signer) Sign(namespace string, payload any) (string, error)

func (*Signer) SignRaw

func (a *Signer) SignRaw(namespace string, payload string) (string, error)

Jump to

Keyboard shortcuts

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