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 (*Server) CreateToken ¶
func (s *Server) CreateToken(ctx context.Context, req *auth.CreateTokenRequest) (*auth.CreateTokenResponse, error)
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 ¶
RegisterGRPC registers the server as an Server on the provided grpc server.