String username = (String) invocation.getArguments()[0];
Credentials credentials = (Credentials) invocation.getArguments()[1];
return new Authentication(username, credentials);
}
});
OpenEngSBSecurityManager openEngSBSecurityManager = new OpenEngSBSecurityManager();
OpenEngSBShiroAuthenticator authenticator = new OpenEngSBShiroAuthenticator();
authenticator.setAuthenticator(authManager);
openEngSBSecurityManager.setAuthenticator(authenticator);
SecurityUtils.setSecurityManager(openEngSBSecurityManager);
}