token

package
v1.41.2 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	auth.UnimplementedAuthenticationMethodTokenServiceServer
	// contains filtered or unexported fields
}

Server is an implementation of auth.AuthenticationMethodTokenServiceServer

It is used to create static tokens within the backing AuthenticationStore.

func NewServer

func NewServer(logger *zap.Logger, store storageauth.Store) *Server

NewServer constructs and configures a new *Server.

func (*Server) AllowsNamespaceScopedAuthentication

func (s *Server) AllowsNamespaceScopedAuthentication(ctx context.Context) bool

func (*Server) CreateToken

CreateToken adapts and delegates the token request to the backing AuthenticationStore.

Implicitly, the Authentication created will be of type auth.Method_TOKEN. Name, Description, and NamespaceKey are both stored in Authentication.Metadata. Given the token is created successfully, the generate clientToken string is returned. Along with the created Authentication, which includes it's identifier and associated timestamps.

func (*Server) RegisterGRPC

func (s *Server) RegisterGRPC(server *grpc.Server)

RegisterGRPC registers the server as an Server on the provided grpc server.

Jump to

Keyboard shortcuts

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