Closed gpinkham closed 8 years ago
Hi, Yeah, good question. It's a little naughty in my opinion, but Spring allows you to inject the HttpServletRequest; you can just autowire it as normal. Spring proxies it and magically gives you the HttpServletRequest for the current request. So you can use that to obtain the session from HttpServletRequest. :)
in the comments you mention: "For example they could set something in the session so that the authentication success handler can treat the first log in differently."
could just be my rust (6 years away from spring and java) but how would one get the session in that service class?
thanks!