@RequestMapping(value = "callback", method = RequestMethod.POST)
 @ResponseBody
 public ResponseEntity<String> callback(
     @RequestParam(value = "token", required = true) String token) {
   try {
     IUser user = back.callback(token);
     // Créer la session
     UUID auth = UUID.randomUUID();
     authDb.put(auth.toString(), user.getId());
     // mettre notre token dans le header
     ResponseEntity<String> response = new ResponseEntity<>(HttpStatus.OK);
     response.getHeaders().set("auth-token", auth.toString());
     return response;
   } catch (Exception e) {
     System.out.println("Erreur callback : " + e.getMessage());
     return new ResponseEntity<String>(HttpStatus.BAD_REQUEST);
   }
 }
 @RequestMapping(value = "solde", method = RequestMethod.GET)
 @ResponseBody
 public ResponseEntity<String> solde(
     @RequestHeader(value = "auth-token", required = true) String authToken) {
   String uid = null;
   if (authToken == null || authDb.get(authToken) == null) {
     return new ResponseEntity<String>(
         "Identification auprès du GI requise", HttpStatus.UNAUTHORIZED);
   } else {
     uid = authDb.get(authToken);
   }
   try {
     double solde = back.solde(uid);
     return new ResponseEntity<>("{solde:" + solde, HttpStatus.OK);
   } catch (Exception e) {
     System.out.println("Erreur solde : " + e.getMessage());
     return new ResponseEntity<String>(e.getMessage(), HttpStatus.BAD_REQUEST);
   }
 }
  @RequestMapping(value = "acheter", method = RequestMethod.GET)
  @ResponseBody
  public ResponseEntity<String> acheter(
      @RequestHeader(value = "auth-token", required = true) String authToken,
      @RequestParam(value = "nomProduit", required = true) String nomProduit) {

    String uid = null;
    if (authToken == null || authDb.get(authToken) == null) {
      return new ResponseEntity<String>(
          "Identification auprès du GI requise", HttpStatus.UNAUTHORIZED);
    } else {
      uid = authDb.get(authToken);
    }
    try {
      if (back.acheter(uid, nomProduit)) {
        return new ResponseEntity<>(HttpStatus.OK);
      } else {
        return new ResponseEntity<>("Erreur : solde insuffisant", HttpStatus.BAD_REQUEST);
      }
    } catch (Exception e) {
      System.out.println("Erreur acheter : " + e.getMessage());
      return new ResponseEntity<String>(e.getMessage(), HttpStatus.BAD_REQUEST);
    }
  }