17 lines
466 B
Kotlin
17 lines
466 B
Kotlin
package com.example.loginapi
|
|
|
|
import org.springframework.security.core.Authentication
|
|
import org.springframework.web.bind.annotation.GetMapping
|
|
import org.springframework.web.bind.annotation.RequestMapping
|
|
import org.springframework.web.bind.annotation.RestController
|
|
|
|
@RestController
|
|
@RequestMapping("/api/users")
|
|
class UserController {
|
|
@GetMapping("/me")
|
|
fun getMe(
|
|
authentication: Authentication,
|
|
): Any {
|
|
return authentication
|
|
}
|
|
} |