Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Spring session and security Hints are mixed #1539

@sshemirani

Description

@sshemirani

Hi, the org.springframework.session.servlet.HttpSessionHints hint has classes that exist in spring security packages such as WebAuthenticationDetails, DefaultSavedRequest and etc.

@NativeHint(trigger = SpringHttpSessionConfiguration.class,
        imports = CommonSessionSerializables.class,
        serializables = {@SerializationHint(types = {
                TreeMap.class,
                Locale.class,
                DefaultSavedRequest.class,
                DefaultCsrfToken.class,
                WebAuthenticationDetails.class,
                SavedCookie.class

        }, typeNames = {
                "java.lang.String$CaseInsensitiveComparator",
        })
        }, abortIfTypesMissing = true)
public class HttpSessionHints implements NativeConfiguration {
    @Override
    public boolean isValid(AotOptions aotOptions) {
        return ClassUtils.isPresent("javax.servlet.http.HttpSession", null);
    }
}

The session hints and the security hits should not be mixed as one cannot use spring session without spring security with spring-native. They should be separated.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions