token

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Set is used by wire.

Functions

This section is empty.

Types

type Server

type Server struct {
	token.UnsafeTokensServer `wire:"-"`
	// contains filtered or unexported fields
}

Server allows session tokens to be managed.

func ProvideServer

func ProvideServer(
	ctx context.Context,
	cfg *config.Config,
	db *pgxpool.Pool,
	logger *log.Logger,
	notifier *cdc.Notifier,
) (*Server, func(), error)

ProvideServer is called by wire.

func (*Server) Current

func (s *Server) Current(ctx context.Context, _ *emptypb.Empty) (*session.Session, error)

Current implements TokensServer.

func (*Server) Find

func (s *Server) Find(scope *session.Scope, server token.Tokens_FindServer) error

Find implements TokensServer.

func (*Server) Invalidate

func (s *Server) Invalidate(ctx context.Context, req *token.InvalidateRequest) (*emptypb.Empty, error)

Invalidate implements TokensServer.

func (*Server) Issue

func (s *Server) Issue(ctx context.Context, req *token.IssueRequest) (*token.IssueResponse, error)

Issue implements TokensServer.

func (*Server) Load

func (s *Server) Load(ctx context.Context, req *token.LoadRequest) (*session.Session, error)

Load implements TokensServer.

func (*Server) Refresh

func (s *Server) Refresh(ctx context.Context, _ *emptypb.Empty) (*token.IssueResponse, error)

Refresh implements TokensServer.

func (*Server) Validate

func (s *Server) Validate(ctx context.Context, t *token.Token) (*session.Session, error)

Validate implements TokensServer.

Jump to

Keyboard shortcuts

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