Project

General

Profile

bug #6885

UserService.loadUserByUsername() cannot find user in long running session

Added by Andreas Kohlbecker almost 2 years ago. Updated over 1 year ago.

Status:
New
Priority:
New
Category:
cdmlib
Target version:
Start date:
08/04/2017
Due date:
% Done:

0%

Severity:
normal
Found in Version:
Tags:

Description

When UserService.loadUserByUsername() in a long running session which is managed through the ConversationHolder, the user is never found.

This can breaks login attempts made from within the conversation since loadUserByUsername() is being used in the DaoAuthenticationProvider:

protected final UserDetails retrieveUser(String username,
            UsernamePasswordAuthenticationToken authentication)
            throws AuthenticationException {
        UserDetails loadedUser;

        try {
            loadedUser = this.getUserDetailsService().loadUserByUsername(username);
        }
        catch (UsernameNotFoundException notFound) {
            if (authentication.getCredentials() != null) {
                String presentedPassword = authentication.getCredentials().toString();
                passwordEncoder.isPasswordValid(userNotFoundEncodedPassword,
                        presentedPassword, null);
            }
            throw notFound;
        }


Related issues

Related to Edit - bug #6886: Entity creation for users having only CREATE may fail in long running conversations Duplicate 08/04/2017

History

#1 Updated by Andreas Kohlbecker almost 2 years ago

  • Description updated (diff)

#2 Updated by Andreas Kohlbecker almost 2 years ago

  • Related to bug #6886: Entity creation for users having only CREATE may fail in long running conversations added

#3 Updated by Andreas Müller over 1 year ago

Is this still an open issue after now not using long running sessions in Vaadin anymore? If not, can we set to Rejected? If yes, can you provide more information or a cdmlib test which describes the problem.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)