RED-6686 - token based web request interceptor
This commit is contained in:
parent
2f92814657
commit
814dc15efb
@ -0,0 +1,27 @@
|
||||
package com.knecon.fforesight.keycloakcommons;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
@ConditionalOnClass(WebMvcConfigurer.class)
|
||||
public class MultiTenancyJwtBasedWebConfiguration implements WebMvcConfigurer {
|
||||
|
||||
private final JwtBasedTenantInterceptor jwtBasedTenantInterceptor;
|
||||
|
||||
|
||||
public MultiTenancyJwtBasedWebConfiguration(JwtBasedTenantInterceptor jwtBasedTenantInterceptor) {
|
||||
|
||||
this.jwtBasedTenantInterceptor = jwtBasedTenantInterceptor;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
|
||||
registry.addWebRequestInterceptor(jwtBasedTenantInterceptor);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user