Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
server
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
m-team
oidc
mytoken
server
Commits
1fbfe32f
Verified
Commit
1fbfe32f
authored
2 years ago
by
Gabriel Zachmann
Browse files
Options
Downloads
Patches
Plain Diff
fix using mytokens with form encoding
parent
6cb0d6e8
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+4
-0
4 additions, 0 deletions
CHANGELOG.md
shared/mytoken/universalmytoken/universalmytoken.go
+7
-0
7 additions, 0 deletions
shared/mytoken/universalmytoken/universalmytoken.go
with
11 additions
and
0 deletions
CHANGELOG.md
+
4
−
0
View file @
1fbfe32f
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
shared/mytoken/universalmytoken/universalmytoken.go
+
7
−
0
View file @
1fbfe32f
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment