Skip to content
Snippets Groups Projects
Verified Commit 1fbfe32f authored by Gabriel Zachmann's avatar Gabriel Zachmann
Browse files

fix using mytokens with form encoding

parent 6cb0d6e8
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,10 @@
## mytoken 0.4.3
### Bugfixes
- Fixed a bug where mytokens could not be used with x-www-form-urlencoding
### Dependencies
- Bumped github.com/jmoiron/sqlx from 1.3.4 to 1.3.5
......
......@@ -19,6 +19,13 @@ type UniversalMytoken struct {
OriginalTokenType model.ResponseType
}
// UnmarshalText implements the encoding.TextUnmarshaler interface
func (t *UniversalMytoken) UnmarshalText(data []byte) (err error) {
s := string(data)
*t, err = Parse(log.StandardLogger(), s)
return errors.WithStack(err)
}
// UnmarshalJSON implements the json.Unmarshaler interface
func (t *UniversalMytoken) UnmarshalJSON(data []byte) (err error) {
var token string
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment