package org.egl_cepgl.pm.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import lombok.extern.slf4j.Slf4j;
import org.egl_cepgl.pm.dto.KCUserRegister;
import org.egl_cepgl.pm.model.user.User;
//import org.egl_cepgl.pm.service.KeyCloakUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

//@Slf4j
//@RestController
//@Api("api/users")
//@RequestMapping("api/users")
//public class KeyCloakController
//{
//    KeyCloakUserService kcService;
//
//    @Autowired
//    public KeyCloakController(KeyCloakUserService kcService) {
//        this.kcService = kcService;
//    }

    //@PreAuthorize("hasAuthority('ROLE_admin')")
//    @PostMapping(value = "/add",consumes= MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
//    @ApiOperation(value="Add ..", notes="Cette méthode permet de..", response = User.class)
//    @ApiResponses(value= { @ApiResponse(code= 200, message = "créé/modifié"), @ApiResponse(code= 400, message = "Non valide") })
//    public ResponseEntity<KCUserRegister> addUser(@RequestBody KCUserRegister userRegisterRecord)
//    {
//        this.kcService.addUser(userRegisterRecord);
//        return ResponseEntity.ok(this.kcService.addUser(userRegisterRecord));
//    }
//}
