auth

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actor added in v1.21.0

type Actor map[string]string

Actor represents some metadata from the context for the audit event.

func ActorFromContext added in v1.21.0

func ActorFromContext(ctx context.Context) Actor

type Option added in v1.21.0

type Option func(*Server)

func WithAuditLoggingEnabled added in v1.21.0

func WithAuditLoggingEnabled(enabled bool) Option

WithAuditLoggingEnabled sets the option for enabling audit logging for the auth server.

type Server

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

Server is the core AuthenticationServiceServer implementations.

It is the service which presents all Authentications created in the backing auth store.

func NewServer

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

func (*Server) AllowsNamespaceScopedAuthentication added in v1.31.0

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

func (*Server) DeleteAuthentication

func (s *Server) DeleteAuthentication(ctx context.Context, req *auth.DeleteAuthenticationRequest) (*emptypb.Empty, error)

DeleteAuthentication deletes the authentication with the supplied ID.

func (*Server) ExpireAuthenticationSelf added in v1.18.0

func (s *Server) ExpireAuthenticationSelf(ctx context.Context, req *auth.ExpireAuthenticationSelfRequest) (*emptypb.Empty, error)

ExpireAuthenticationSelf expires the Authentication which was derived from the request context. If no expire_at is provided, the current time is used. This is useful for logging out a user. If the expire_at is greater than the current expiry time, the expiry time is extended.

func (*Server) GetAuthentication

func (s *Server) GetAuthentication(ctx context.Context, r *auth.GetAuthenticationRequest) (*auth.Authentication, error)

GetAuthentication returns the Authentication identified by the supplied id.

func (*Server) GetAuthenticationSelf

func (s *Server) GetAuthenticationSelf(ctx context.Context, _ *emptypb.Empty) (*auth.Authentication, error)

GetAuthenticationSelf returns the Authentication which was derived from the request context.

func (*Server) ListAuthentications

ListAuthentications produces a set of authentications for the provided method filter and pagination parameters.

func (*Server) RegisterGRPC added in v1.17.0

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

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

Directories

Path Synopsis
middleware

Jump to

Keyboard shortcuts

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