提交 7366029c 编写于 作者: Z zhourui

fix effectivePerson constructor

上级 6e174806
......@@ -21,6 +21,7 @@ import javax.crypto.NoSuchPaddingException;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import com.x.base.core.project.config.Config;
import com.x.base.core.project.gson.GsonPropertyObject;
import com.x.base.core.project.tools.Crypto;
import com.x.base.core.project.tools.DateTools;
......@@ -73,6 +74,10 @@ public class EffectivePerson extends GsonPropertyObject {
}
}
public EffectivePerson(String distinguishedName, TokenType tokenType, String key) throws Exception {
this(distinguishedName, tokenType, key, Config.token().getEncryptType());
}
public EffectivePerson(String distinguishedName, TokenType tokenType, String key, String encryptType)
throws InvalidKeyException, NoSuchAlgorithmException, InvalidKeySpecException, NoSuchPaddingException,
IllegalBlockSizeException, BadPaddingException, UnsupportedEncodingException, NoSuchMethodException,
......@@ -203,14 +208,6 @@ public class EffectivePerson extends GsonPropertyObject {
return matcher.find() && StringUtils.equalsIgnoreCase(matcher.group(2), this.unique);
}).findFirst();
return optional.isPresent();
// for (String str : names) {
// if (StringUtils.isNotEmpty(str)) {
// Matcher matcher = PERSON_DISTINGUISHEDNAME_PATTERN.matcher(str);
// if (matcher.find() && StringUtils.equalsIgnoreCase(matcher.group(2), this.unique)) {
// return true;
// }
// }
// }
}
return false;
}
......
......@@ -56,6 +56,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"@o2oa/tidy-jsdoc-o2": "^0.0.25",
"dateformat": "^3.0.3",
"docdash": "^1.2.0",
"fast-glob": "^3.2.2",
......@@ -80,7 +81,6 @@
"request": "^2.88.2",
"shelljs": "^0.8.4",
"single-line-log": "^1.1.2",
"targz": "^1.0.1",
"@o2oa/tidy-jsdoc-o2": "latest"
"targz": "^1.0.1"
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册