getUsernameAndPassword();
rbacToken = null;
try {
final ISecurityFacade securityFacade = SecurityFacadeHandler.getSecurityFacade();
LOGGER.log(Level.FINE, "Security Facade instance used: " + securityFacade);
securityFacade.setDefaultSecurityCallback(this);
rbacToken = securityFacade.authenticate();
securityFacade.setDefaultSecurityCallback(null);
if ( rbacToken == null) {
throw new LoginException(RBACLoginModule.class.getName() + " Login failed, invalid credentials !");
}
final Builder<String> grantedPermissionsBuilder = ImmutableSet.builder();
for (String permissionOfInterest : permissionsOfInterest) {
if (securityFacade.hasPermission(rbacResource, permissionOfInterest)) {
grantedPermissionsBuilder.add(permissionOfInterest);
}
}
grantedPermissions = grantedPermissionsBuilder.build();
} catch (SecurityFacadeException e) {