Back to godoc.org

Package tokenaccessor

v10.286.1+incompatible
Latest Go to latest

The latest major version is .

Published: Jul 8, 2020 | License: Apache-2.0 | Module: go.aporeto.io/trireme-lib

Index

type TokenAccessor

type TokenAccessor interface {
	GetTokenValidity() time.Duration
	GetTokenServerID() string

	CreateAckPacketToken(context *pucontext.PUContext, auth *connection.AuthInfo, secrets secrets.Secrets) ([]byte, error)
	CreateSynPacketToken(context *pucontext.PUContext, auth *connection.AuthInfo, claimsHeader *claimsheader.ClaimsHeader, secrets secrets.Secrets) (token []byte, err error)
	CreateSynAckPacketToken(context *pucontext.PUContext, auth *connection.AuthInfo, claimsHeader *claimsheader.ClaimsHeader, secrets secrets.Secrets) (token []byte, err error)
	ParsePacketToken(auth *connection.AuthInfo, data []byte, secrets secrets.Secrets) (*tokens.ConnectionClaims, error)
	ParseAckToken(auth *connection.AuthInfo, data []byte, secrets secrets.Secrets) (*tokens.ConnectionClaims, error)
}

TokenAccessor define an interface to access LockedTokenEngine

func New

func New(serverID string, validity time.Duration, secret secrets.Secrets, binary bool) (TokenAccessor, error)

New creates a new instance of TokenAccessor interface

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier