Commit f9ca2065 authored by Sébastien DA ROCHA's avatar Sébastien DA ROCHA
Browse files

Fix add user resource in oidc

parent 5826bda2
Pipeline #8793 passed with stage
in 1 minute and 1 second
......@@ -295,7 +295,11 @@ export class LegacyController {
async addUserResource(@Req() req, @Body() body) {
const token: JWTToken = req.headers.token;
try {
return await this.legacyService.addUserResource(token, body);
if (token.authzKey == null) { // is OIDC token
return await this.legacyServiceOidc.addUserResource(token, body);
} else {
return await this.legacyService.addUserResource(token, body);
}
} catch (error) {
if (error instanceof HttpException) {
throw error;
......
......@@ -161,7 +161,7 @@ export class LegacyServiceOIDC extends LegacyService {
for (const accessRequest of accessRequests) {
// Request access the the specified service and the specified modes
let res = await request.post(`${this.conf.legacyAuthServiceUrl}/add_user_service/`).form(
let res = await request.post(`${this.conf.legacyAuthServiceUrl}/add_user_service_oidc/`).form(
{
username: token.email,
service_id: accessRequest.id,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment