jwtv1

package
v0.1.30 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use JWT.ProtoReflect.Descriptor instead.

func (*JWT) GetClaimType

func (x *JWT) GetClaimType() string

func (*JWT) GetConfig

func (x *JWT) GetConfig() *v1.Config

func (*JWT) GetEnabled

func (x *JWT) GetEnabled() bool

func (*JWT) GetSubject

func (x *JWT) GetSubject() string

func (*JWT) GetTokenHeader

func (x *JWT) GetTokenHeader() map[string]string

func (*JWT) ProtoMessage

func (*JWT) ProtoMessage()

func (*JWT) ProtoReflect

func (x *JWT) ProtoReflect() protoreflect.Message

func (*JWT) Reset

func (x *JWT) Reset()

func (*JWT) String

func (x *JWT) String() string

func (*JWT) Validate

func (m *JWT) Validate() error

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

func (m *JWT) ValidateAll() error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL