fix localuser for OIDC

This commit is contained in:
_Bastler
2021-09-17 14:02:43 +02:00
parent f053ece7da
commit ea64e79e46
2 changed files with 7 additions and 4 deletions
@@ -68,7 +68,7 @@ export class AuthenticateController extends BaseController {
await openIDClient.checkTokenAuth(authTokenData.hydraAccessToken);
res.writeStatus("200");
this.addCorsHeaders(res);
return res.end(JSON.stringify({ authToken: token, username: authTokenData.username }));
return res.end(JSON.stringify({ authToken: token, username: authTokenData.username, userUuid : authTokenData.identifier }));
} catch (err) {
console.info("User was not connected", err);
}
@@ -83,7 +83,7 @@ export class AuthenticateController extends BaseController {
const authToken = jwtTokenManager.createAuthToken(sub, userInfo.access_token, userInfo.username);
res.writeStatus("200");
this.addCorsHeaders(res);
return res.end(JSON.stringify({ authToken: authToken, username: userInfo.username }));
return res.end(JSON.stringify({ authToken: authToken, username: userInfo.username, userUuid : sub }));
} catch (e) {
return this.errorToResponse(e, res);
}