pwtv1

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pwt_v1_token_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Token added in v0.0.6

type Token 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 (*Token) Descriptor deprecated added in v0.0.6

func (*Token) Descriptor() ([]byte, []int)

Deprecated: Use Token.ProtoReflect.Descriptor instead.

func (*Token) GetAudience added in v0.0.6

func (x *Token) GetAudience() []string

func (*Token) GetClientId added in v0.0.6

func (x *Token) GetClientId() string

func (*Token) GetClientSecret added in v0.0.6

func (x *Token) GetClientSecret() string

func (*Token) GetExpirationTime added in v0.0.6

func (x *Token) GetExpirationTime() *durationpb.Duration

func (*Token) GetIssuedAt added in v0.0.6

func (x *Token) GetIssuedAt() *durationpb.Duration

func (*Token) GetIssuer added in v0.0.6

func (x *Token) GetIssuer() string

func (*Token) GetJwtId added in v0.0.6

func (x *Token) GetJwtId() string

func (*Token) GetNotBefore added in v0.0.6

func (x *Token) GetNotBefore() *durationpb.Duration

func (*Token) GetSubject added in v0.0.6

func (x *Token) GetSubject() string

func (*Token) ProtoMessage added in v0.0.6

func (*Token) ProtoMessage()

func (*Token) ProtoReflect added in v0.0.6

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

func (*Token) Reset added in v0.0.6

func (x *Token) Reset()

func (*Token) String added in v0.0.6

func (x *Token) String() string

func (*Token) Validate added in v0.0.6

func (m *Token) Validate() error

Validate checks the field values on Token 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 (*Token) ValidateAll added in v0.0.6

func (m *Token) ValidateAll() error

ValidateAll checks the field values on Token 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 TokenMultiError, or nil if none found.

type TokenMultiError added in v0.0.6

type TokenMultiError []error

TokenMultiError is an error wrapping multiple validation errors returned by Token.ValidateAll() if the designated constraints aren't met.

func (TokenMultiError) AllErrors added in v0.0.6

func (m TokenMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (TokenMultiError) Error added in v0.0.6

func (m TokenMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type TokenValidationError added in v0.0.6

type TokenValidationError struct {
	// contains filtered or unexported fields
}

TokenValidationError is the validation error returned by Token.Validate if the designated constraints aren't met.

func (TokenValidationError) Cause added in v0.0.6

func (e TokenValidationError) Cause() error

Cause function returns cause value.

func (TokenValidationError) Error added in v0.0.6

func (e TokenValidationError) Error() string

Error satisfies the builtin error interface

func (TokenValidationError) ErrorName added in v0.0.6

func (e TokenValidationError) ErrorName() string

ErrorName returns error name.

func (TokenValidationError) Field added in v0.0.6

func (e TokenValidationError) Field() string

Field function returns field value.

func (TokenValidationError) Key added in v0.0.6

func (e TokenValidationError) Key() bool

Key function returns key value.

func (TokenValidationError) Reason added in v0.0.6

func (e TokenValidationError) 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