Skip to content

Commit

Permalink
#10 credential pour les requêtes cds isgi
Browse files Browse the repository at this point in the history
  • Loading branch information
epointal committed May 28, 2018
1 parent c337d1e commit 82b2d56
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 31 deletions.
14 changes: 7 additions & 7 deletions dist/isgi-component-vjs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/isgi-component-vjs.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "isgi-component-vjs",
"version": "0.2.10",
"version": "0.3.0",
"description": "Webcomponent - Connexion isgi Webservice ",
"preproduction": {
"url": "https://api.poleterresolide.fr/"
Expand Down
6 changes: 4 additions & 2 deletions src/isgi-error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
{
"en":{
"SERVER_ISGI_HS": "The ISGI server is actually shut down.<br />Please try again later.",
"SERVER_FORMATER_HS": "The ForM@Ter server is actually shut down.<br />Please try again later."
"SERVER_FORMATER_HS": "The ForM@Ter server is actually shut down.<br />Please try again later.",
"ACCESS_SERVER_FORBIDDEN": "Your session has expired. Access to the server is no longer allowed. Reload the page"
},
"fr":{
"SERVER_ISGI_HS": "Le service ISGI est actuellement éteint.<br />Veuillez rééssayer ultérieurement.",
"SERVER_FORMATER_HS": "Le serveur de ForM@Ter est actuellement éteint.<br />Veuillez rééssayer ultérieurement."
"SERVER_FORMATER_HS": "Le serveur de ForM@Ter est actuellement éteint.<br />Veuillez rééssayer ultérieurement.",
"ACCESS_SERVER_FORBIDDEN": "Votre session a expiré. L'accès au serveur n'est plus autorisé. Veuillez recharger la page."
}
}
</i18n>
Expand Down
13 changes: 12 additions & 1 deletion src/isgi-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,8 @@ export default {
}
},
response => {
console.log( "handle error");
_this.handleError( response , query);
// var next = function(){
Expand All @@ -211,10 +213,19 @@ export default {
},
handleError: function(rep, query){
this.serverStatus = this.SERVER_HS;
if( rep && rep.body && rep.body.error){
var error = rep.body.error;
}else{
var error = "SERVER_FORMATER_HS";
switch( rep.status){
case 403:
var error = "ACCESS_SERVER_FORBIDDEN";
break;
default:
var error = "SERVER_FORMATER_HS";
}
}
this.reset();
var event = new CustomEvent("errorSearchIndiceEvent", {detail: {error: error}});
Expand Down
2 changes: 1 addition & 1 deletion src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import IsgiComponent from './isgi-component.vue';
* ajoute withCredentials: true pour "identifier", suivre l'utilisateur
* au cours de ses différentes requêtes
*/
Vue.http.options.xhr = { withCredentials: true };
//Vue.http.options.xhr = { withCredentials: true };
//Vue.http.options.emulateJSON = true;

ljs.addAliases({
Expand Down
17 changes: 0 additions & 17 deletions webcomponents/isgi-component-vjs_0.2.10.js

This file was deleted.

1 change: 0 additions & 1 deletion webcomponents/isgi-component-vjs_0.2.10.js.map

This file was deleted.

17 changes: 17 additions & 0 deletions webcomponents/isgi-component-vjs_0.3.0.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions webcomponents/isgi-component-vjs_0.3.0.js.map

Large diffs are not rendered by default.

0 comments on commit 82b2d56

Please sign in to comment.