Plume Admin is based on Plume Framework, it provides Jersey web services to build an administration area.
If you are looking for a JavaScript frontened that uses these web-services, check out the Plume Admin UI for AngularJS.
Looking for a demo? Check out the Plume Demo project.
- Maven dependency:
<dependency>
<groupId>com.coreoz</groupId>
<artifactId>plume-admin-ws</artifactId>
</dependency>
- Guice module:
install(new GuiceAdminWsWithDefaultsModule())
- Jersey web-services:
packages("com.coreoz.plume.admin.webservices")
- Jersey admin security:
register(AdminSecurityFeature.class)
- Generate a JWT secret key and register it in your configuration:
admin.jwt-secret = "long_generated_password_to_secure_jwt_tokens"
- SQL, see setup files
- Install a JS frontend like Plume Admin UI for AngularJS
To fetch the current user in an administration web-service, this Jersey binder must be installed in the Jersey configuration class:
register(new AbstractBinder() {
@Override
protected void configure() {
bindFactory(WebSessionAdminFactory.class).to(WebSessionPermission.class).in(RequestScoped.class);
bindFactory(WebSessionAdminFactory.class).to(WebSessionAdmin.class).in(RequestScoped.class);
}
});
To use this module without Admin Web-services, an implementation of WebSessionClassProvider
must be provided.
To generate JWT secret, LastPass generator can be used with a password length of about 50 characters.
# this key should be changed in production if test users cannot be trusted
admin.jwt-secret = "long_generated_password_to_secure_jwt_tokens"
# default values
admin.session-duration = 12 hours
admin.login.max-attempts = 5
admin.login.blocked-duration = 30 seconds
# enable to ensure that users passwords are long enough
admin.passwords.min-length = 0
To set up the module, install the Plume Schedule module in ApplicationModule
: install(new GuiceSchedulerModule());
To set up the module:
- Maven:
<dependency>
<groupId>com.coreoz</groupId>
<artifactId>plume-admin-api-log</artifactId>
</dependency>
- Install the Plume Schedule module in
ApplicationModule
:install(new GuiceSchedulerModule());
- Scheduler:
LogApiScheduledJobs logApiScheduledJobs; // from dependency injection
logApiScheduledJobs.scheduleJobs();
See the upgrade file to see the upgrade instructions.
If hibernate is used, install Guice brige module: install(new GuiceHibernateToQuerydslBridgeModule())