Documentation ¶
Index ¶
- Variables
- type JWT
- func (*JWT) Descriptor() ([]byte, []int)deprecated
- func (x *JWT) GetClaimType() string
- func (x *JWT) GetConfig() *v1.Config
- func (x *JWT) GetEnabled() bool
- func (x *JWT) GetSubject() string
- func (x *JWT) GetTokenHeader() map[string]string
- func (*JWT) ProtoMessage()
- func (x *JWT) ProtoReflect() protoreflect.Message
- func (x *JWT) Reset()
- func (x *JWT) String() string
- func (m *JWT) Validate() error
- func (m *JWT) ValidateAll() error
- type JWTMultiError
- type JWTValidationError
Constants ¶
This section is empty.
Variables ¶
var File_middleware_jwt_v1_jwt_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type JWT ¶
type JWT struct { Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` ClaimType string `protobuf:"bytes,3,opt,name=claim_type,proto3" json:"claim_type,omitempty"` TokenHeader map[string]string `` /* 165-byte string literal not displayed */ // The token used security.jwt.v1. Config *v1.Config `protobuf:"bytes,100,opt,name=config,proto3" json:"config,omitempty"` // contains filtered or unexported fields }
JSON Web Token
func (*JWT) Descriptor
deprecated
func (*JWT) GetClaimType ¶
func (*JWT) GetEnabled ¶
func (*JWT) GetSubject ¶
func (*JWT) GetTokenHeader ¶
func (*JWT) ProtoMessage ¶
func (*JWT) ProtoMessage()
func (*JWT) ProtoReflect ¶
func (x *JWT) ProtoReflect() protoreflect.Message
func (*JWT) Validate ¶
Validate checks the field values on JWT with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*JWT) ValidateAll ¶
ValidateAll checks the field values on JWT with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in JWTMultiError, or nil if none found.
type JWTMultiError ¶
type JWTMultiError []error
JWTMultiError is an error wrapping multiple validation errors returned by JWT.ValidateAll() if the designated constraints aren't met.
func (JWTMultiError) AllErrors ¶
func (m JWTMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (JWTMultiError) Error ¶
func (m JWTMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type JWTValidationError ¶
type JWTValidationError struct {
// contains filtered or unexported fields
}
JWTValidationError is the validation error returned by JWT.Validate if the designated constraints aren't met.
func (JWTValidationError) Cause ¶
func (e JWTValidationError) Cause() error
Cause function returns cause value.
func (JWTValidationError) Error ¶
func (e JWTValidationError) Error() string
Error satisfies the builtin error interface
func (JWTValidationError) ErrorName ¶
func (e JWTValidationError) ErrorName() string
ErrorName returns error name.
func (JWTValidationError) Field ¶
func (e JWTValidationError) Field() string
Field function returns field value.
func (JWTValidationError) Key ¶
func (e JWTValidationError) Key() bool
Key function returns key value.
func (JWTValidationError) Reason ¶
func (e JWTValidationError) Reason() string
Reason function returns reason value.