Guest User

Untitled

a guest
Mar 29th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. <?php
  2. /**
  3. * Controller - RESTful Test
  4. * Point d'entrée pour les webservices du projet StudentCo
  5. * @param method la méthode appelée dans bl.php_user_filter
  6. * @param ...les autres paramètres nécessaires suivant l'appel
  7. */
  8.  
  9. require_once ('StudentCoRestHandler.class.php');
  10.  
  11. $method = "";
  12. if(isset($_GET["method"])) $method = $_GET["method"];
  13.  
  14. //controls the RESTful services - URL mapping
  15. switch ($method) {
  16. case "authenticate":
  17. //to handle REST Url
  18. $studentcoRestHandler = new StudentcoRestHandler();
  19. $username = $_GET["username"];
  20. $password = $_GET["password"];
  21. $studentcoRestHandler->restAuthenticate($username , $password);
  22. break;
  23. case "" :
  24. //404 - not found;
  25. break;
  26.  
  27. }
Add Comment
Please, Sign In to add comment