package rest; import dto.ConnectDB; import dto.ScanObj; import io.quarkiverse.kerberos.KerberosPrincipal; import io.quarkus.security.Authenticated; import io.quarkus.security.identity.SecurityIdentity; import javax.inject.Inject; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Collections; import java.util.LinkedHashMap; import java.util.Set; import javax.ws.rs.Produces; @Path("/testKerberos") @Authenticated public class UsersResource { @Inject SecurityIdentity identity; @Inject KerberosPrincipal kerberosPrincipal; @GET @Path("/me") @Produces("text/plain") public String me() { return identity.getPrincipal().getName(); } }