jwt

package
v0.0.0-...-4f702ff Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClaimsProto2Claims

func ClaimsProto2Claims(claimsProto *Claims) (claims *jwt.Claims)

func RegisteredClaimsProto2RegisteredClaims

func RegisteredClaimsProto2RegisteredClaims(registeredClaimsProto *RegisteredClaims) (registeredClaims *gojwt.RegisteredClaims)

func TokenDataProto2TokenData

func TokenDataProto2TokenData(tokenDataProto *TokenData) (tokenData *jwt.TokenData)

Types

type Claims

type Claims struct {
	RegisteredClaims     *RegisteredClaims `protobuf:"bytes,1,opt,name=RegisteredClaims,proto3" json:"RegisteredClaims,omitempty"`
	TokenData            *TokenData        `protobuf:"bytes,2,opt,name=TokenData,proto3" json:"TokenData,omitempty"`
	AccessToken          string            `protobuf:"bytes,3,opt,name=AccessToken,proto3" json:"AccessToken,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func Claims2ClaimsProto

func Claims2ClaimsProto(claims *jwt.Claims) (claimsProto *Claims)

func (*Claims) Descriptor

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

func (*Claims) GetAccessToken

func (m *Claims) GetAccessToken() string

func (*Claims) GetRegisteredClaims

func (m *Claims) GetRegisteredClaims() *RegisteredClaims

func (*Claims) GetTokenData

func (m *Claims) GetTokenData() *TokenData

func (*Claims) MarshalBinary

func (e *Claims) MarshalBinary() (data []byte, err error)

func (*Claims) ProtoMessage

func (*Claims) ProtoMessage()

func (*Claims) Reset

func (m *Claims) Reset()

func (*Claims) String

func (m *Claims) String() string

func (*Claims) UnmarshalBinary

func (e *Claims) UnmarshalBinary(data []byte) (err error)

func (*Claims) XXX_DiscardUnknown

func (m *Claims) XXX_DiscardUnknown()

func (*Claims) XXX_Marshal

func (m *Claims) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Claims) XXX_Merge

func (m *Claims) XXX_Merge(src proto.Message)

func (*Claims) XXX_Size

func (m *Claims) XXX_Size() int

func (*Claims) XXX_Unmarshal

func (m *Claims) XXX_Unmarshal(b []byte) error

type RegisteredClaims

type RegisteredClaims struct {
	ID                   string               `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Issuer               string               `protobuf:"bytes,2,opt,name=Issuer,proto3" json:"Issuer,omitempty"`
	Subject              string               `protobuf:"bytes,3,opt,name=Subject,proto3" json:"Subject,omitempty"`
	Audience             []string             `protobuf:"bytes,4,rep,name=Audience,proto3" json:"Audience,omitempty"`
	ExpiresAt            *timestamp.Timestamp `protobuf:"bytes,5,opt,name=ExpiresAt,proto3" json:"ExpiresAt,omitempty"`
	NotBefore            *timestamp.Timestamp `protobuf:"bytes,6,opt,name=NotBefore,proto3" json:"NotBefore,omitempty"`
	IssuedAt             *timestamp.Timestamp `protobuf:"bytes,7,opt,name=IssuedAt,proto3" json:"IssuedAt,omitempty"`
	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
	XXX_unrecognized     []byte               `json:"-"`
	XXX_sizecache        int32                `json:"-"`
}

func RegisteredClaims2RegisteredClaimsProto

func RegisteredClaims2RegisteredClaimsProto(registeredClaims *gojwt.RegisteredClaims) (registeredClaimsProto *RegisteredClaims)

func (*RegisteredClaims) Descriptor

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

func (*RegisteredClaims) GetAudience

func (m *RegisteredClaims) GetAudience() []string

func (*RegisteredClaims) GetExpiresAt

func (m *RegisteredClaims) GetExpiresAt() *timestamp.Timestamp

func (*RegisteredClaims) GetID

func (m *RegisteredClaims) GetID() string

func (*RegisteredClaims) GetIssuedAt

func (m *RegisteredClaims) GetIssuedAt() *timestamp.Timestamp

func (*RegisteredClaims) GetIssuer

func (m *RegisteredClaims) GetIssuer() string

func (*RegisteredClaims) GetNotBefore

func (m *RegisteredClaims) GetNotBefore() *timestamp.Timestamp

func (*RegisteredClaims) GetSubject

func (m *RegisteredClaims) GetSubject() string

func (*RegisteredClaims) MarshalBinary

func (e *RegisteredClaims) MarshalBinary() (data []byte, err error)

func (*RegisteredClaims) ProtoMessage

func (*RegisteredClaims) ProtoMessage()

func (*RegisteredClaims) Reset

func (m *RegisteredClaims) Reset()

func (*RegisteredClaims) String

func (m *RegisteredClaims) String() string

func (*RegisteredClaims) UnmarshalBinary

func (e *RegisteredClaims) UnmarshalBinary(data []byte) (err error)

func (*RegisteredClaims) XXX_DiscardUnknown

func (m *RegisteredClaims) XXX_DiscardUnknown()

func (*RegisteredClaims) XXX_Marshal

func (m *RegisteredClaims) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RegisteredClaims) XXX_Merge

func (m *RegisteredClaims) XXX_Merge(src proto.Message)

func (*RegisteredClaims) XXX_Size

func (m *RegisteredClaims) XXX_Size() int

func (*RegisteredClaims) XXX_Unmarshal

func (m *RegisteredClaims) XXX_Unmarshal(b []byte) error

type TokenData

type TokenData struct {
	SessionID            string     `protobuf:"bytes,1,opt,name=SessionID,proto3" json:"SessionID,omitempty"`
	User                 *user.User `protobuf:"bytes,2,opt,name=User,proto3" json:"User,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func TokenData2TokenDataProto

func TokenData2TokenDataProto(tokenData *jwt.TokenData) (tokenDataProto *TokenData)

func (*TokenData) Descriptor

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

func (*TokenData) GetSessionID

func (m *TokenData) GetSessionID() string

func (*TokenData) GetUser

func (m *TokenData) GetUser() *user.User

func (*TokenData) MarshalBinary

func (e *TokenData) MarshalBinary() (data []byte, err error)

func (*TokenData) ProtoMessage

func (*TokenData) ProtoMessage()

func (*TokenData) Reset

func (m *TokenData) Reset()

func (*TokenData) String

func (m *TokenData) String() string

func (*TokenData) UnmarshalBinary

func (e *TokenData) UnmarshalBinary(data []byte) (err error)

func (*TokenData) XXX_DiscardUnknown

func (m *TokenData) XXX_DiscardUnknown()

func (*TokenData) XXX_Marshal

func (m *TokenData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TokenData) XXX_Merge

func (m *TokenData) XXX_Merge(src proto.Message)

func (*TokenData) XXX_Size

func (m *TokenData) XXX_Size() int

func (*TokenData) XXX_Unmarshal

func (m *TokenData) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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