Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

ClientDetails must contain sessionId value #102

Closed
glebfox opened this issue Aug 26, 2021 · 1 comment
Closed

ClientDetails must contain sessionId value #102

glebfox opened this issue Aug 26, 2021 · 1 comment
Assignees
Labels
type: bug Something isn't working
Milestone

Comments

@glebfox
Copy link
Contributor

glebfox commented Aug 26, 2021

For QA:

Session ID presence can be checked with the following code:

protected String getSessionId() {
    CurrentAuthentication currentAuthentication = applicationContext.getBean(CurrentAuthentication.class);
    Authentication authentication = currentAuthentication.getAuthentication();
    if (authentication != null) {
        Object details = authentication.getDetails();
        if (details instanceof ClientDetails) {
            return ((ClientDetails) details).getSessionId();
        }
    }

    return null;
}
@glebfox glebfox added this to the 1.1.0 milestone Aug 26, 2021
@glebfox glebfox self-assigned this Aug 26, 2021
@glebfox glebfox added the type: bug Something isn't working label Aug 26, 2021
@lovtsovaik
Copy link

verified

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants