authn

package
v1.42.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActorFromContext

func ActorFromContext(ctx context.Context) *audit.Actor

func GetActorFromAuthentication

func GetActorFromAuthentication(authentication *auth.Authentication, ip string) *audit.Actor

Types

type Option

type Option func(*Server)

func WithAuditLoggingEnabled

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

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

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

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