Hi!
Im trying to override the method handleUnAuthorizedRequest which is in node_modules/abp/abpHttpConfiguration. I have tried googling and some class extentions, but cannot figure it out...
I tried adding a class in "root.modules.ts" and build "MyAboHttpConfiguration" from there to inject in "AbpHttpInterceptor" (or MyAbpHttpInterceptor), but there is some dependencies that I imagine will be difficault to instanciate. And forking the project can cause some trouble in the future I guess...
Would be nice if someone have a tips to where to go forward with this.
7 Answer(s)
-
0
let abpHttpConfiguration = injector.get(AbpHttpConfiguration); abpHttpConfiguration.handleUnAuthorizedRequest = function(messagePromise: any, targetUrl?: string) { const self = this; if (messagePromise) { messagePromise.done(() => { this.handleTargetUrl(targetUrl || '/'); }); } else { self.handleTargetUrl(targetUrl || '/'); } };Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
That work well! Thank you!
But handleUnAuthorizedRequest is not the method that triggers the popup with error when user is timed out. Trying to figure it out now.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Which error is that?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
-
0
@larsfk Is it convenient to share your complete project code? [email protected]
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
I will ask my customer if thats okey for them. Do you want to see all of the code or just the part we have been working on here?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Or you can use Zero's Demo project to reproduce the problems you encountered.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)

