I follow this tutorial Best practice for REST token-based authentication with JAX-RS and Jersey and I am at the filter part.
I am using OSGI and I don't know how to register my Filter. I created my filter and build my project with no error. I deployed my bundle in karaf but my @Secured services are not secured cause the filter is not called...
Should I add my filter in the Activator ? In the blueprint ? (I am new in osgi world)
Here my filter :
@Secured
@Provider
@Priority(Priorities.AUTHENTICATION)
public class AuthenticationFilter implements ContainerRequestFilter {
    private static Logger LOGGER = LoggerFactory.getLogger(AuthenticationFilter.class);
    @Override
    public void filter(ContainerRequestContext requestContext) throws IOException {
        LOGGER.info("[AuthenticationFilter] started");
        // Get the HTTP Authorization header from the request
        String authorizationHeader = 
            requestContext.getHeaderString(HttpHeaders.AUTHORIZATION);
        // Check if the HTTP Authorization header is present and formatted correctly 
        if (authorizationHeader == null || !authorizationHeader.startsWith("Bearer ")) {
            throw new NotAuthorizedException("Authorization header must be provided");
        }
        // Extract the token from the HTTP Authorization header
        String token = authorizationHeader.substring("Bearer".length()).trim();
        try {
            // Validate the token
            validateToken(token);
        } catch (Exception e) {
            requestContext.abortWith(Response.status(Response.Status.UNAUTHORIZED).build());
        }
        LOGGER.info("[AuthenticationFilter] ended");
    }
    //TODO: add the key in properties
    //TODO: check the username in DB
    private void validateToken(String token) throws Exception {
        // Check if it was issued by the server and if it's not expired
        // Throw an Exception if the token is invalid
        String username = Jwts.parser()
            .setSigningKey("jeSuisLaSecretPhrase,1234,ilFaudraMePlacerEnConf,Merci")
            .parseClaimsJws(token)
            .getBody()
            .getIssuer();
        if(!"admin".equals(username)){
            throw new NotAuthorizedException("bad token");
        }
    }
}
EDIT
Karaf cannot load "http://cxf.apache.org/blueprint/jaxrs" Here is my blueprint :
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
    xmlns:jaxrs="http://cxf.apache.org/blueprint/jaxrs">
    <!-- Beans declaration -->
    <bean id="AuthenticationServlet" class="com.mycompanie.fr.core.servlets.jaxrs.impl.AuthenticationServletImpl">
        <property name="service" ref="service" />
    </bean>
    <service ref="AuthenticationServlet" interface="com.mycompanie.fr.core.servlets.jaxrs.AuthenticationServlet" />
    <bean id="CommitmentServlet" class="com.mycompanie.fr.core.servlets.jaxrs.impl.CommitmentServletImpl">
        <property name="service" ref="service" />
    </bean>
    <service ref="CommitmentServlet" interface="com.mycompanie.fr.core.servlets.jaxrs.CommitmentServlet" />
    <!-- Dependency definition -->
    <reference id="service" interface="com.mycompanie.fr.core.api.services.MainService" />
    <jaxrs:providers>
      <ref bean="AuthenticationFilter" />
    </jaxrs:providers>
    <bean id="AuthenticationFilter" class="com.mycompanie.fr.core.servlets.filter.AuthenticationFilter"/>
    <web-spa xmlns="http://www.mycompanie.com/xmlns/web-spa/v1.0.0" context="/myProject">
        <service ref="AuthenticationServlet" />
        <service ref="CommitmentServlet" />
    </web-spa>
</blueprint>