Documentation ¶
Index ¶
- func ActorFromContext(ctx context.Context) *audit.Actor
- func GetActorFromAuthentication(authentication *auth.Authentication, ip string) *audit.Actor
- type Option
- type Server
- func (s *Server) AllowsNamespaceScopedAuthentication(ctx context.Context) bool
- func (s *Server) DeleteAuthentication(ctx context.Context, req *auth.DeleteAuthenticationRequest) (*emptypb.Empty, error)
- func (s *Server) ExpireAuthenticationSelf(ctx context.Context, req *auth.ExpireAuthenticationSelfRequest) (*emptypb.Empty, error)
- func (s *Server) GetAuthentication(ctx context.Context, r *auth.GetAuthenticationRequest) (*auth.Authentication, error)
- func (s *Server) GetAuthenticationSelf(ctx context.Context, _ *emptypb.Empty) (*auth.Authentication, error)
- func (s *Server) ListAuthentications(ctx context.Context, r *auth.ListAuthenticationsRequest) (*auth.ListAuthenticationsResponse, error)
- func (s *Server) RegisterGRPC(server *grpc.Server)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetActorFromAuthentication ¶
func GetActorFromAuthentication(authentication *auth.Authentication, ip string) *audit.Actor
Types ¶
type Option ¶
type Option func(*Server)
func WithAuditLoggingEnabled ¶
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 (*Server) AllowsNamespaceScopedAuthentication ¶
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 ¶
func (s *Server) ListAuthentications(ctx context.Context, r *auth.ListAuthenticationsRequest) (*auth.ListAuthenticationsResponse, error)
ListAuthentications produces a set of authentications for the provided method filter and pagination parameters.
func (*Server) RegisterGRPC ¶
RegisterGRPC registers the server as an Server on the provided grpc server.