Skip to content
Snippets Groups Projects
Verified Commit 96577e59 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

WIP: OAuth authn

parent 4584e92b
No related branches found
No related tags found
No related merge requests found
Pipeline #48686 failed
......@@ -7,9 +7,8 @@ const issuer = 'https://keycloak.sso.gwdg.de/auth/realms/academiccloud'
async function refreshAccessToken (token: any) {
try {
const url =
issuer + '/protocol/openid-connect?' +
new URLSearchParams({
const url = issuer + '/protocol/openid-connect/token'
const params = new URLSearchParams({
client_id: clientId,
client_secret: clientSecret,
grant_type: 'refresh_token',
......@@ -21,6 +20,7 @@ async function refreshAccessToken (token: any) {
'Content-Type': 'application/x-www-form-urlencoded'
},
method: 'POST'
body: params
})
const refreshedTokens = await response.json()
......
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