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
39f4f891
Verified
Commit
39f4f891
authored
2 years ago
by
Gabriel Zachmann
Browse files
Options
Downloads
Patches
Plain Diff
fix tokeninfo remote info
parent
ef725ec9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
internal/server/web/static/js/tokeninfo-status.js
+3
-3
3 additions, 3 deletions
internal/server/web/static/js/tokeninfo-status.js
internal/server/web/static/js/tokeninfo.js
+4
-1
4 additions, 1 deletion
internal/server/web/static/js/tokeninfo.js
with
7 additions
and
4 deletions
internal/server/web/static/js/tokeninfo-status.js
+
3
−
3
View file @
39f4f891
...
...
@@ -36,7 +36,7 @@ async function update_tokeninfo() {
fillTokenInfo
(
payload
);
return
;
}
let
tokeninfoEndpoint
=
storageGet
(
'
tokeninfo_endpoint
'
);
tokeninfoEndpoint
ToUse
=
storageGet
(
'
tokeninfo_endpoint
'
);
let
jwksUri
=
storageGet
(
'
jwks_uri
'
);
transferEndpoint
=
""
;
try
{
...
...
@@ -52,7 +52,7 @@ async function update_tokeninfo() {
await
fetch
(
url
).
then
(
function
(
res
)
{
return
res
.
json
();
}).
then
(
function
(
data
)
{
tokeninfoEndpoint
=
data
[
'
tokeninfo_endpoint
'
];
tokeninfoEndpoint
ToUse
=
data
[
'
tokeninfo_endpoint
'
];
jwksUri
=
data
[
'
jwks_uri
'
];
transferEndpoint
=
data
[
'
token_transfer_endpoint
'
];
}).
catch
(
function
(
e
)
{
...
...
@@ -78,7 +78,7 @@ async function update_tokeninfo() {
try
{
await
$
.
ajax
({
type
:
"
POST
"
,
url
:
tokeninfoEndpoint
,
url
:
tokeninfoEndpoint
ToUse
,
data
:
JSON
.
stringify
({
'
action
'
:
'
introspect
'
,
'
mytoken
'
:
token
,
...
...
This diff is collapsed.
Click to expand it.
internal/server/web/static/js/tokeninfo.js
+
4
−
1
View file @
39f4f891
const
$tokenInput
=
$
(
'
#tokeninfo-token
'
);
let
tokeninfoEndpointToUse
;
function
_tokeninfo
(
action
,
successFnc
,
errorFnc
,
token
=
undefined
)
{
let
data
=
{
'
action
'
:
action
...
...
@@ -10,7 +12,7 @@ function _tokeninfo(action, successFnc, errorFnc, token = undefined) {
data
=
JSON
.
stringify
(
data
);
$
.
ajax
({
type
:
"
POST
"
,
url
:
storageGet
(
'
tokeninfo
_e
ndpoint
'
)
,
url
:
tokeninfo
E
ndpoint
ToUse
,
data
:
data
,
success
:
successFnc
,
error
:
errorFnc
,
...
...
@@ -222,6 +224,7 @@ const listMsg = $('#list-msg');
const
listCopy
=
$
(
'
#list-copy
'
);
function
_getListTokenInfo
(
token
)
{
tokeninfoEndpointToUse
=
storageGet
(
"
tokeninfo_endpoint
"
);
_tokeninfo
(
'
list_mytokens
'
,
function
(
infoRes
)
{
listMsg
.
html
(
tokenlistToHTML
(
infoRes
[
'
mytokens
'
],
revocationClassFromTokenList
));
...
...
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