Documentation ¶
Index ¶
Constants ¶
View Source
const ( FieldIAT = FieldType(iota + 1) FieldEXP FieldNBF FieldISS FieldSUB FieldAUD FieldToken FieldKID FieldStateID FieldCustom = FieldType(0b1110) )
View Source
const ( ExtendedTypeNumber = ExtendedType(iota) ExtendedTypeString ExtendedTypeBool ExtendedTypeRawJSON ExtendedTypeVariationsFlag = ExtendedType(0b1000) )
View Source
const ( SegmentIgnore = OriginSegment(0) FirstSegmentServer = OriginSegment(iota + 1) FirstSegmentCentral FirstSegmentDistributed TypeSegmentIdentity = OriginSegment(iota + 1) TypeSegmentCookie TypeSegmentClientID )
Variables ¶
View Source
var ( HS256Header = []byte("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9") ES256Header = []byte("eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9") )
View Source
var FieldNames = map[string]FieldType{ "iat": FieldIAT, "exp": FieldEXP, "nbf": FieldNBF, "iss": FieldISS, "sub": FieldSUB, "aud": FieldAUD, "token": FieldToken, "stateID": FieldStateID, "kid": FieldKID, }
Functions ¶
This section is empty.
Types ¶
type Codec ¶
func (*Codec) DecodeToken ¶
type ExtendedType ¶
type ExtendedType byte
type GenericField ¶
type GenericField struct {
// contains filtered or unexported fields
}
func NewGenericField ¶
func NewGenericField(key string) *GenericField
func (*GenericField) DecodeMicroField ¶
func (f *GenericField) DecodeMicroField(data []byte) ([]byte, error)
func (*GenericField) EncodeMicroField ¶
func (f *GenericField) EncodeMicroField() ([]byte, error)
func (*GenericField) Key ¶
func (f *GenericField) Key() string
func (*GenericField) MarshalJSON ¶
func (f *GenericField) MarshalJSON() ([]byte, error)
func (*GenericField) UnmarshalJSON ¶
func (f *GenericField) UnmarshalJSON(data []byte) error
type KidField ¶
type KidField struct {
// contains filtered or unexported fields
}
func NewKidField ¶
func NewKidField() *KidField
func (*KidField) DecodeMicroField ¶
func (*KidField) EncodeMicroField ¶
func (*KidField) MarshalJSON ¶
func (*KidField) UnmarshalJSON ¶
type OriginField ¶
type OriginField struct {
// contains filtered or unexported fields
}
func NewOriginField ¶
func NewOriginField(filedType FieldType, clientID string, authDomain string) *OriginField
func (*OriginField) DecodeMicroField ¶
func (f *OriginField) DecodeMicroField(data []byte) ([]byte, error)
func (*OriginField) EncodeMicroField ¶
func (f *OriginField) EncodeMicroField() ([]byte, error)
func (*OriginField) Key ¶
func (f *OriginField) Key() string
func (*OriginField) MarshalJSON ¶
func (f *OriginField) MarshalJSON() ([]byte, error)
func (*OriginField) UnmarshalJSON ¶
func (f *OriginField) UnmarshalJSON(data []byte) error
type OriginSegment ¶
type OriginSegment byte
type StateIDField ¶
type StateIDField struct {
// contains filtered or unexported fields
}
func NewStateIDField ¶
func NewStateIDField() *StateIDField
func (*StateIDField) DecodeMicroField ¶
func (f *StateIDField) DecodeMicroField(data []byte) ([]byte, error)
func (*StateIDField) EncodeMicroField ¶
func (f *StateIDField) EncodeMicroField() ([]byte, error)
func (*StateIDField) Key ¶
func (f *StateIDField) Key() string
func (*StateIDField) MarshalJSON ¶
func (f *StateIDField) MarshalJSON() ([]byte, error)
func (*StateIDField) UnmarshalJSON ¶
func (f *StateIDField) UnmarshalJSON(data []byte) error
type SubjectField ¶
type SubjectField struct {
// contains filtered or unexported fields
}
func NewSubjectField ¶
func NewSubjectField() *SubjectField
func (*SubjectField) DecodeMicroField ¶
func (f *SubjectField) DecodeMicroField(data []byte) ([]byte, error)
func (*SubjectField) EncodeMicroField ¶
func (f *SubjectField) EncodeMicroField() ([]byte, error)
func (*SubjectField) Key ¶
func (f *SubjectField) Key() string
func (*SubjectField) MarshalJSON ¶
func (f *SubjectField) MarshalJSON() ([]byte, error)
func (*SubjectField) UnmarshalJSON ¶
func (f *SubjectField) UnmarshalJSON(data []byte) error
type TimestampField ¶
type TimestampField struct {
// contains filtered or unexported fields
}
func NewTimestampField ¶
func NewTimestampField(fieldType FieldType) *TimestampField
func (*TimestampField) DecodeMicroField ¶
func (f *TimestampField) DecodeMicroField(data []byte) ([]byte, error)
func (*TimestampField) EncodeMicroField ¶
func (f *TimestampField) EncodeMicroField() ([]byte, error)
func (*TimestampField) Key ¶
func (f *TimestampField) Key() string
func (*TimestampField) MarshalJSON ¶
func (f *TimestampField) MarshalJSON() ([]byte, error)
func (*TimestampField) UnmarshalJSON ¶
func (f *TimestampField) UnmarshalJSON(data []byte) error
type TokenField ¶
type TokenField struct {
// contains filtered or unexported fields
}
func NewTokenField ¶
func NewTokenField() *TokenField
func (*TokenField) DecodeMicroField ¶
func (f *TokenField) DecodeMicroField(data []byte) ([]byte, error)
func (*TokenField) EncodeMicroField ¶
func (f *TokenField) EncodeMicroField() ([]byte, error)
func (*TokenField) Key ¶
func (f *TokenField) Key() string
func (*TokenField) MarshalJSON ¶
func (f *TokenField) MarshalJSON() ([]byte, error)
func (*TokenField) UnmarshalJSON ¶
func (f *TokenField) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.