ESUP NFC TAG
pour des services institutionnels utilisant les cartes NFC
- Vincent Bonamy
- David Lemaignent
@RooJavaBean @JsonIgnoreProperties(ignoreUnknown = true) public class EsupNfcTagLog { String csn; String eppn; String desfireId; String lastname; String firstname; String location; String eppnInit; }
<bean id="carteCultureExtApi" class="org.esupportail.nfctag.service.api.impl.AppliExtRestWs"> <property name="isTagableUrl" value="https://app.univ-ville.fr/nfc-ws/isTagable"/> <property name="validateTagUrl" value="https://app.univ-ville.fr/nfc-ws/validateTag"/> <property name="getLocationsUrl" value="https://app.univ-ville.fr/nfc-ws/getLocations"/> <property name="description" value="Web Service Carte Culture"/> <property name="backgroundColor" value="rgb(121, 119, 116)"/> <property name="header" value="https://app.univ-ville.fr/resources/images/logo.jpg"/> </bean>
<bean id="tagIdCheckApiId" class="org.esupportail.nfctag.service.api.impl.TagIdCheckRestWs"> <property name="tagIdCheckUrl" value="https://app-id.univ-ville.fr/wsrest/tagIdCheck"/> <property name="description" value="via Id"/> </bean>
@RequestMapping(value="/leocarte/livraison/isTagable", method=RequestMethod.POST) @ResponseBody public ResponseEntityisLeocarteOk4Livraison(@RequestBody EsupNfcTagLog esupNfcTagLog) { HttpHeaders responseHeaders = new HttpHeaders(); return new ResponseEntity ("OK", responseHeaders, HttpStatus.OK); }
@RequestMapping(value="/leocarte/livraison/validateTag", method=RequestMethod.POST) @ResponseBody public ResponseEntitylivraisonLeocarte(@RequestBody EsupNfcTagLog esupNfcTagLog) { HttpHeaders responseHeaders = new HttpHeaders(); try { String loginInit = esupNfcTagLog.getEppnInit().replaceAll("@univ-rouen.fr", ""); IndividuService.easyIdLivre(esupNfcTagLog.getEppn(), esupNfcTagLog.getCsn()); return new ResponseEntity ("OK", responseHeaders, HttpStatus.OK); } catch(Exception e) { return new ResponseEntity ("KO", responseHeaders, HttpStatus.INTERNAL_SERVER_ERROR); } }