-
1. Re: AS7 Configuration/ CLI - How best to represent an array attribute
ctomc Jul 9, 2012 5:37 PM (in response to j4m3s)Hi,
there are many ways if you are refering to DMR model. it can be list of strings or map<String,String>
but to better help you can you provide bit more context as atm i cannot tell what exacly are you trying to do and where.
--
tomaz
-
2. Re: AS7 Configuration/ CLI - How best to represent an array attribute
j4m3s Jul 9, 2012 6:28 PM (in response to ctomc)Thanks for the quick reply. I'm not sure what DMR model is I'm afraid.
I thought the question might be generic to any attribute, but in my case specifically, the attribute can be queried using the following command in the CLI:
/subsystem=security/security-domain=my-auth/authentication=classic/:read-attribute(name=login-modules,include-defaults=true)
This command returns the following:
{
"outcome" => "success",
"result" => [{
"code" => "com.me.MyLoginModule",
"flag" => "required",
"module-options" => [
("cookie-names" => "Cookie1|Cookie2"),
("session-type" => "EITHER")
]
}]
}
And I would like to be able to set "cookie-names" to be an array (or List!) of Strings, rather than a pipe-delimited String.
The LoginModule extends org.jboss.security.auth.spi.AbstractServerLoginModule. The method initialize has a parameter Map<String,?> options that is set by JBoss based on the contents of the module-options part of the JBoss config file. I would like to know how to set the module-options in the config file so that I can retrieve one from the Map as a List<?> or array please.
Hope that's clearer - happy to provide more info if not