##// END OF EJS Templates
the build script is updated
the build script is updated

File last commit:

r0:7110eac54b19 v1.0.0 default
r2:b698f0e8883c default
Show More
SecurityServices.js
31 lines | 910 B | application/javascript | JavascriptLexer
/ src / main / js / security / SecurityServices.js
/**
* Created by andrei on 21.08.16.
*/
define([
"dojo/_base/declare",
"implab/safe",
"./NoneSecData",
"./SecData"
], function(declare, safe, NoneSecData, SecData) {
let SecurityServices = declare(null, {
});
SecurityServices.getSecurityDataService = function(tokenType) {
switch (tokenType) {
case this.PASSWORD_AUTH_TYPE:
return new SecData(tokenType);
case this.SATISFY_ANY_AUTH_TYPE:
return new NoneSecData();
case this.REJECT_ALL_AUTH_TYPE:
throw Error("NotImplemented");
default:
throw Error("Unsupported auth type " + tokenType);
}
};
SecurityServices.PASSWORD_AUTH_TYPE = "password";
SecurityServices.SATISFY_ANY_AUTH_TYPE = "satisfyany";
SecurityServices.REJECT_ALL_AUTH_TYPE = "rejectall";
return SecurityServices;
});