Class RequireAuthenticationHandlerInterceptor
java.lang.Object
com.atlassian.connect.spring.internal.auth.RequireAuthenticationHandlerInterceptor
- All Implemented Interfaces:
org.springframework.web.servlet.HandlerInterceptor
@Component
public class RequireAuthenticationHandlerInterceptor
extends Object
implements org.springframework.web.servlet.HandlerInterceptor
A handler interceptor that:
- enforces JWT authentication for all handler methods not annotated with
IgnoreJwt
.
- enforces Forge Remote authentication for all handler methods annotated with ForgeRemote
.
- adds Connect context parameters into `AtlassianHostUser` for all handler methods annotated with ForgeRemote
(associateConnect=true)-
Constructor Summary
ConstructorDescriptionRequireAuthenticationHandlerInterceptor
(AddonDescriptorLoader addonDescriptorLoader, ForgeConnectMappingService forgeConnectMappingService) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.web.servlet.HandlerInterceptor
afterCompletion, postHandle
-
Constructor Details
-
RequireAuthenticationHandlerInterceptor
public RequireAuthenticationHandlerInterceptor(AddonDescriptorLoader addonDescriptorLoader, ForgeConnectMappingService forgeConnectMappingService)
-
-
Method Details
-
preHandle
public boolean preHandle(@Nonnull jakarta.servlet.http.HttpServletRequest request, @Nonnull jakarta.servlet.http.HttpServletResponse response, @Nonnull Object handler) throws Exception - Specified by:
preHandle
in interfaceorg.springframework.web.servlet.HandlerInterceptor
- Throws:
Exception
-