Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InvalidToken ¶
type InvalidToken struct{ Reason string }
InvalidToken is an error type returned by Validators to indicate that the provided authentication token was not valid.
func (InvalidToken) Error ¶
func (e InvalidToken) Error() string
type NotAuthenticated ¶
type NotAuthenticated struct{}
NotAuthenticated is an error type returned by Validators to indicate that the provided authentication token could not be authenticated.
func (NotAuthenticated) Error ¶
func (NotAuthenticated) Error() string
type Service ¶
type Service struct { pb.UnimplementedIdentityServer // contains filtered or unexported fields }
Service implements the gRPC service in terms of a Validator and Issuer.
func New ¶
func New(log zerolog.Logger, validator Validator, recordEvent func(parent runtime.Object, eventType, reason, message string), csrService csrService) *Service
New creates a new identity service.
func (*Service) Certify ¶
func (svc *Service) Certify(ctx context.Context, req *pb.CertifyRequest) (*pb.CertifyResponse, error)
type Validator ¶
type Validator interface { // Validate takes an opaque authentication token, attempts to validate its // authenticity, and produces a DNS-like identifier. // // An InvalidToken error should be returned if the provided token was not in a // correct form. // // A NotAuthenticated error should be returned if the authenticity of the // token cannot be validated. Validate(context.Context, []byte) (string, error) }
Validator implementors accept a bearer token, validates it, and returns a DNS-form identity.
Click to show internal directories.
Click to hide internal directories.