class OauthConfig {

    @Bean
    public FilterRegistrationBean tokenAuthenticationFilterRegistration() {
        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean<>(tokenAuthenticationFilter);
        filterRegistrationBean.setOrder(0);
        return filterRegistrationBean;
    }

}