Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
44dac4a6
Commit
44dac4a6
authored
Jul 15, 2019
by
Sascha Herzinger
Browse files
jsonify authentication success response
parent
905b01e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/src/main/java/lcsb/mapviewer/web/config/AuthenticationSuccessHandlerImpl.java
View file @
44dac4a6
...
...
@@ -8,6 +8,7 @@ import javax.servlet.ServletException;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -56,9 +57,11 @@ public class AuthenticationSuccessHandlerImpl implements AuthenticationSuccessHa
result
.
put
(
"token"
,
request
.
getSession
().
getId
());
result
.
put
(
"login"
,
user
.
getLogin
());
request
.
getSession
().
setMaxInactiveInterval
(
Configuration
.
getSessionLength
());
String
json
=
new
ObjectMapper
().
writeValueAsString
(
result
);
response
.
setContentType
(
"application/json"
);
response
.
getWriter
().
print
(
result
);
response
.
getWriter
().
print
(
json
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment