//由于后台事务执行时为administrator的Context导致凭证无权限新增,此处赋值为user的Context
ILoginModule loginModule = LoginModuleFactory.getLocalInstance(ctx);
String encodePwd = CryptoTean.encrypt(Constants.USER1_Number, Constants.USER1_Password);
LoginContext loginContext = new LoginContext(Constants.USER1_Number, encodePwd, ctx.getSolution(), ctx.getAIS(), ctx.getLocale());
loginContext.put("dbType", "Oracle");
loginContext.put("UserAuthPattern", "BaseDB");
try
{
String sessionId = loginModule.login(loginContext);
ctx = SessionManager.getInstance().getSession(sessionId).getContext();
}
catch (BOSLoginException e)
{
e.printStackTrace();
throw new BOSException(e.getMessage());
}
EAS 中重定向 Context及获得用户密码策略
最新推荐文章于 2021-07-02 11:00:58 发布