Documentation ¶
Index ¶
- Variables
- func AssignNextBytesToken(dst *[]byte, dec *Decoder) error
- func AssignNextStringToken(dst **string, dec *Decoder) error
- func DecoderSettings(inUseNumber bool)
- func Dump(v interface{})
- func EncodeAudience(enc *Encoder, aud []string, flatten bool) error
- func Engine() string
- func Marshal(v interface{}) ([]byte, error)
- func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error)
- func NewDecoder(r io.Reader) *json.Decoder
- func NewEncoder(w io.Writer) *json.Encoder
- func ReadNextStringToken(dec *Decoder) (string, error)
- func Unmarshal(b []byte, v interface{}) error
- type DecodeCtx
- type DecodeCtxContainer
- type Decoder
- type Delim
- type Encoder
- type Marshaler
- type Number
- type RawMessage
- type Registry
- type Unmarshaler
Constants ¶
This section is empty.
Variables ¶
var FlattenAudience uint32
FlattenAudience is a flag to specify if we should flatten the "aud" entry to a string when there's only one entry. In jwx < 1.1.8 we just dumped everything as an array of strings, but apparently AWS Cognito doesn't handle this well.
So now we have the ability to dump "aud" as a string if there's only one entry, but we need to retain the old behavior so that we don't accidentally break somebody else's code. (e.g. messing up how signatures are calculated)
Functions ¶
func AssignNextBytesToken ¶
func AssignNextStringToken ¶
func DecoderSettings ¶
func DecoderSettings(inUseNumber bool)
Sets the global configuration for json decoding
func MarshalIndent ¶
MarshalIndent is just a proxy for "encoding/json".MarshalIndent
func NewDecoder ¶
NewDecoder respects the values specified in DecoderSettings, and creates a Decoder that has certain features turned on/off
func ReadNextStringToken ¶
Types ¶
type DecodeCtx ¶
type DecodeCtx interface {
Registry() *Registry
}
DecodeCtx is an interface for objects that needs that extra something when decoding JSON into an object.
func NewDecodeCtx ¶
type DecodeCtxContainer ¶
DecodeCtxContainer is used to differentiate objects that can carry extra decoding hints and those who can't.
type RawMessage ¶
type RawMessage = json.RawMessage
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewRegistry ¶
func NewRegistry() *Registry
type Unmarshaler ¶
type Unmarshaler = json.Unmarshaler