Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8961271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T15:51:03+00:00 2026-06-15T15:51:03+00:00

I have a custom AuthenticationProvider with the authenticate method. @Override public Authentication authenticate(Authentication authentication)

  • 0

I have a custom AuthenticationProvider with the authenticate method.

    @Override
public Authentication authenticate(Authentication authentication) throws AuthenticationException {

        > Check username, password, throw exceptions where needed

        return new CustomAuthenticationToken(username, grantedAuthorities);
    }

And the token:

public class CustomAuthenticationToken extends UsernamePasswordAuthenticationToken
{
     public CustomAuthenticationToken(ICurrentUserContext currentUser, List<GrantedAuthority> authorities) {
         super(currentUser.getUsername(), currentUser.getPassword(), authorities);
     }
}

When I login with Chrome, Firefox, there is no problem whatsoever.

In IE 8/9 I have a very weird problem. Sometimes it will only call the method authenticate one time, it will login and everything works as expected. But from time to time, it will call authenticate twice, and fails to log in.

Does anybody have any clue?

I’ve tested it on Tomcat btw.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T15:51:04+00:00Added an answer on June 15, 2026 at 3:51 pm

    I’ve found the problem, with careful tracing the debug log of the Spring Security.. Hopefully this will help someone in the future.

    Apparantly, spring security default migrates sessions after login. But in IE it does not migrate the authentication cookie to the new session, resulting in presenting of the login page.

    The fix is easy, and can be done in the Spring Security xml:

    <http use-expressions="true">
    
        <!-- 
            This settings is for IE. Default this setting is on migrateSession.
            When IE tries to migrate the session, the auth cookie does not migrate,
            resulting in a nice login screen again, after you've logged in.
    
            This setting ensures that the session will not be invalidated, and thus IE will still work as expected.
         -->
        <session-management session-fixation-protection="none" />
    </http>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom AuthenticationProvider that simply returns the Authentication object for the authenticate
I have custom validation rule: public function customRule($check) { } Inside this rule I
I have a custom-authentication-provider defined in my Spring Security configuration. This class implements AuthenticationProvider,
Have simple Spring Security webapp with password encoding: <security:authentication-manager alias=authenticationManager> <security:authentication-provider user-service-ref=personService> <security:password-encoder hash=md5
I'm trying to make a simple username/password authentication in a Spring Security web app.
I need to have a custom authentication in spring, it should be a simple
I have a working web application that uses username/password SpringSecurity configuration. Now I want
I have a working 3.0.2 applicationContext-security.xml that uses a custom authenticator <global-method-security pre-post-annotations=disabled> </global-method-security>
I have created a custom AuthenticationProvider to perform custom security checks. I have also
I have custom ImageView: public class ShadowedImageView extends ImageView { private Paint mPaint; public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.