File tree 1 file changed +4
-4
lines changed
generators/spring-boot/templates/src/main/java/_package_/web/rest 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -117,15 +117,15 @@ public class AuthenticateController {
117
117
< % _ } _%>
118
118
119
119
/**
120
- * {@code GET /authenticate} : check if the user is authenticated, and return its login .
120
+ * {@code GET /authenticate} : check if the user is authenticated, and return a boolean value .
121
121
*
122
122
* @param principal the authentication principal.
123
- * @return the login if the user is authenticated.
123
+ * @return a boolean indicating if the user is authenticated.
124
124
*/
125
125
@GetMapping(value = "/authenticate", produces = MediaType.TEXT_PLAIN_VALUE)
126
- public String isAuthenticated(Principal principal) {
126
+ public boolean isAuthenticated(Principal principal) {
127
127
LOG.debug("REST request to check if the current user is authenticated");
128
- return principal == null ? null : principal.getName() ;
128
+ return principal != null;
129
129
}
130
130
131
131
public String createToken(Authentication authentication, boolean rememberMe) {
You can’t perform that action at this time.
0 commit comments