我对委托人使用的查询通过数据库工作,我得到了一条记录
select 'role', password from t_user where username = 'jdoe';
但是当我尝试通过 jboss-cli.sh 使用它时
./subsystem=elytron/jdbc-realm=jdbc-realm:add(principal-query=[{ \
data-source=MySqlDSroscam, \
sql="SELECT 'role', password FROM t_user WHERE username = ?", \
attribute-mapping=[{index=1, to=Roles}] \
simple-digest-mapper={algorithm=simple-digest-md5, password-index=2}, \
}])
我收到这个错误
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0097: Wrong type for 'principal-query'. Expected [LIST] but was OBJECT",
"rolled-back" => true
}