2 Answer(s)
-
0
Hi @nagib.aouini
Our team didn't work on such integration but as far as I know, some of our customer are using keycloak. Could you open the server side log file App_Data/Logs.txt and share the related error message ?
Thanks,
-
0
Hi @ismcagdas, We have fixed this issue by overwrite the ABPHttpInterceptor function name Intercept. In this function, by default some custom headers are added by the NormalizeRequestHeaders function which creating the problem for keycloak access token request. Now we filter our request bypass from the NormalizeRequestHeaders function then it works, and we got the access token from Keycloak. Is there any alternate and best solution for this?
Like below example code:
protected normalizeRequestHeaders(request: HttpRequest<any>): HttpRequest<any> { var modifiedHeaders = new HttpHeaders(); if({Filter http request by custom param}) { return request; } else { modifiedHeaders = request.headers.set("Pragma", "no-cache") .set("Cache-Control", "no-cache") .set("Expires", "Sat, 01 Jan 2000 00:00:00 GMT"); modifiedHeaders = this.addXRequestedWithHeader(modifiedHeaders); modifiedHeaders = this.addAuthorizationHeaders(modifiedHeaders); modifiedHeaders = this.addAspNetCoreCultureHeader(modifiedHeaders); modifiedHeaders = this.addAcceptLanguageHeader(modifiedHeaders); modifiedHeaders = this.addTenantIdHeader(modifiedHeaders); return request.clone({ headers: modifiedHeaders }); } }