Documentation ¶
Index ¶
- Variables
- type PWT
- func (*PWT) Descriptor() ([]byte, []int)deprecated
- func (x *PWT) GetAudience() []string
- func (x *PWT) GetClientId() string
- func (x *PWT) GetClientSecret() string
- func (x *PWT) GetExpirationTime() *durationpb.Duration
- func (x *PWT) GetIssuedAt() *durationpb.Duration
- func (x *PWT) GetIssuer() string
- func (x *PWT) GetJwtId() string
- func (x *PWT) GetNotBefore() *durationpb.Duration
- func (x *PWT) GetSubject() string
- func (*PWT) ProtoMessage()
- func (x *PWT) ProtoReflect() protoreflect.Message
- func (x *PWT) Reset()
- func (x *PWT) String() string
- func (m *PWT) Validate() error
- func (m *PWT) ValidateAll() error
- type PWTMultiError
- type PWTValidationError
Constants ¶
This section is empty.
Variables ¶
var File_pwt_v1_pwt_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type PWT ¶
type PWT struct { ExpirationTime *durationpb.Duration `protobuf:"bytes,1,opt,name=expiration_time,proto3" json:"expiration_time,omitempty"` IssuedAt *durationpb.Duration `protobuf:"bytes,2,opt,name=issued_at,proto3" json:"issued_at,omitempty"` NotBefore *durationpb.Duration `protobuf:"bytes,3,opt,name=not_before,proto3" json:"not_before,omitempty"` Issuer string `protobuf:"bytes,4,opt,name=issuer,proto3" json:"issuer,omitempty"` Audience []string `protobuf:"bytes,5,rep,name=audience,proto3" json:"audience,omitempty"` Subject string `protobuf:"bytes,6,opt,name=subject,proto3" json:"subject,omitempty"` JwtId string `protobuf:"bytes,7,opt,name=jwt_id,proto3" json:"jwt_id,omitempty"` ClientId string `protobuf:"bytes,8,opt,name=client_id,proto3" json:"client_id,omitempty"` ClientSecret string `protobuf:"bytes,9,opt,name=client_secret,proto3" json:"client_secret,omitempty"` // contains filtered or unexported fields }
PWT is a web token that can be used to authenticate a user with protobuf services.
func (*PWT) Descriptor
deprecated
func (*PWT) GetAudience ¶
func (*PWT) GetClientId ¶
func (*PWT) GetClientSecret ¶
func (*PWT) GetExpirationTime ¶
func (x *PWT) GetExpirationTime() *durationpb.Duration
func (*PWT) GetIssuedAt ¶
func (x *PWT) GetIssuedAt() *durationpb.Duration
func (*PWT) GetNotBefore ¶
func (x *PWT) GetNotBefore() *durationpb.Duration
func (*PWT) GetSubject ¶
func (*PWT) ProtoMessage ¶
func (*PWT) ProtoMessage()
func (*PWT) ProtoReflect ¶
func (x *PWT) ProtoReflect() protoreflect.Message
func (*PWT) Validate ¶
Validate checks the field values on PWT 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 (*PWT) ValidateAll ¶
ValidateAll checks the field values on PWT 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 PWTMultiError, or nil if none found.
type PWTMultiError ¶
type PWTMultiError []error
PWTMultiError is an error wrapping multiple validation errors returned by PWT.ValidateAll() if the designated constraints aren't met.
func (PWTMultiError) AllErrors ¶
func (m PWTMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PWTMultiError) Error ¶
func (m PWTMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PWTValidationError ¶
type PWTValidationError struct {
// contains filtered or unexported fields
}
PWTValidationError is the validation error returned by PWT.Validate if the designated constraints aren't met.
func (PWTValidationError) Cause ¶
func (e PWTValidationError) Cause() error
Cause function returns cause value.
func (PWTValidationError) Error ¶
func (e PWTValidationError) Error() string
Error satisfies the builtin error interface
func (PWTValidationError) ErrorName ¶
func (e PWTValidationError) ErrorName() string
ErrorName returns error name.
func (PWTValidationError) Field ¶
func (e PWTValidationError) Field() string
Field function returns field value.
func (PWTValidationError) Key ¶
func (e PWTValidationError) Key() bool
Key function returns key value.
func (PWTValidationError) Reason ¶
func (e PWTValidationError) Reason() string
Reason function returns reason value.