logger.error("Error loading properties from string. Reason:" + e.getMessage());
e.printStackTrace();
}
}
AuthorizationModule authorizationModule = null;
try
{
authorizationModule = (AuthorizationModule)Class.forName(authorizerClass).newInstance();
}
catch(Exception e)
{
logger.error("The authorizationModule-class was wrong:" + e.getMessage() + ": defaulting to infoglue:s own", e);
authorizationModule = (AuthorizationModule)Class.forName(InfoGlueBasicAuthorizationModule.class.getName()).newInstance();
}
authorizationModule.setExtraProperties(extraProperties);
logger.info("authorizerClass:" + authorizerClass + ":" + authorizationModule.getClass().getName());
InfoGluePrincipal infoGluePrincipal = authorizationModule.getAuthorizedInfoGluePrincipal(userName);
logger.info("infoGluePrincipal:" + infoGluePrincipal);
if(infoGluePrincipal != null)
{
logger.info("roles:" + infoGluePrincipal.getRoles());
logger.info("groups:" + infoGluePrincipal.getGroups());