1 |
57253
|
michele.ar
|
package eu.dnetlib.organizations.controller;
|
2 |
|
|
|
3 |
|
|
import org.springframework.security.core.Authentication;
|
4 |
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
5 |
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
6 |
|
|
import org.springframework.web.bind.annotation.RestController;
|
7 |
|
|
|
8 |
|
|
@RestController
|
9 |
|
|
@RequestMapping("/api/user")
|
10 |
|
|
public class UserController {
|
11 |
|
|
|
12 |
|
|
@RequestMapping(value = "/current", method = RequestMethod.GET)
|
13 |
|
|
public User utente(final Authentication authentication) {
|
14 |
|
|
return User.generate(authentication);
|
15 |
|
|
}
|
16 |
|
|
}
|