package dev.dinauer.maven.user;

import io.quarkus.security.identity.SecurityIdentity;
import jakarta.inject.Inject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import org.eclipse.microprofile.rest.client.inject.RestClient;

@Path("/users")
public class UserResource
{
    @RestClient
    UserClient userClient;

    @Inject
    SecurityIdentity identity;

    @GET
    public Object get()
    {
        System.out.println(identity.getPrincipal().getName());
        return userClient.getUser();
    }
}
