Spring security returns Login Page instead of value | بلاگ

Spring security returns Login Page instead of value

تعرفه تبلیغات در سایت

آخرین مطالب

امکانات وب

Vote count: 0

I added spring security to /api/** url (I have custom filter and custom provider). But of course I did mistake and can't find it: after successful authentication spring security redirects me to login page instead of call /api/sendhellowrold and returns me "Hello World" string. It works if I added successful handler and sendRedirect to page which should return me HTML. This is ok, but not about rest api

this is my configure method

    protected void configure(HttpSecurity http) throws Exception {
                .addFilterAfter(createSsoTokenFilter(), UsernamePasswordAuthenticationFilter.class);

    public SsoTokenFilter createSsoTokenFilter() throws Exception {
        SsoTokenFilter ssoTokenFilter = new SsoTokenFilter();
        return ssoTokenFilter;
asked 54 secs ago

نویسنده : استخدام کار بازدید : 20 تاريخ : سه شنبه 2 مرداد 1397 ساعت: 22:20