universalmytoken

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UniversalMytoken

type UniversalMytoken struct {
	JWT               string
	OriginalToken     string
	OriginalTokenType model.ResponseType
}

UniversalMytoken is a type used for Mytokens passed in http requests; these can be normal Mytoken or a short token. This type will always provide a jwt of the (long) Mytoken

func Parse

func Parse(rlog log.Ext1FieldLogger, token string) (UniversalMytoken, error)

Parse parses a mytoken string (that can be a long or short mytoken) into an UniversalMytoken holding the JWT

func (*UniversalMytoken) UnmarshalJSON

func (t *UniversalMytoken) UnmarshalJSON(data []byte) (err error)

UnmarshalJSON implements the json.Unmarshaler interface

func (*UniversalMytoken) UnmarshalText added in v0.5.0

func (t *UniversalMytoken) UnmarshalText(data []byte) (err error)

UnmarshalText implements the encoding.TextUnmarshaler interface

Jump to

Keyboard shortcuts

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