// If SSO is not active, check username and password, i.e. performs the authentication;
// instead, if SSO is active, the authentication mechanism is provided by the SSO itself, so SpagoBI does not make
// any authentication, just creates the user profile object and puts it into Spago permanent container
if(!isSSOActive) {
ISecurityServiceSupplier supplier = SecurityServiceSupplierFactory.createISecurityServiceSupplier();
Assert.assertNotNull(usr, "User identifier not spicified");
Assert.assertNotNull(usr, "Password not spicified");
if( supplier.checkAuthentication(usr, pwd) == null) {
logger.warn("An attempt to authenticate with wrong credential has made [" + usr + "/" + pwd +"]");
throw new SpagoBIServiceException(SERVICE_NAME, "An attempt to authenticate with wrong credential has made [" + usr + "/" + pwd +"]");
}
} else {