public boolean securityDomainHasLoginModule ( String domainName , String moduleName ) throws Exception { Address addr = Address . root ( ) . add ( SUBSYSTEM , SUBSYSTEM_SECURITY , SECURITY_DOMAIN , domainName ) ; addr . add ( AUTHENTICATION , CLASSIC ) ; addr . add ( LOGIN_MODULE , moduleName ) ; ModelNode request = createRequest ( "read-resource" , addr ) ; ModelNode response = execute ( request ) ; return isSuccess ( response ) ; }
Check if a certain login module is present inside the passed security domain