Boolean pingWithAutz()
throws RedbackServiceException;
- @Path( "logIn" )
- @POST
- @RedbackAuthorization( noRestriction = true, noPermission = true )
- @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
/**
* check username/password and create a http session.
* So no more need of reuse username/password for all ajaxRequest
*/
+ @Path( "logIn" )
+ @POST
+ @RedbackAuthorization( noRestriction = true, noPermission = true )
+ @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
User logIn( LoginRequest loginRequest )
throws RedbackServiceException;
- @Path( "isLogged" )
- @GET
- @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
- @RedbackAuthorization( noRestriction = true )
/**
* simply check if current user has an http session opened with authz passed
* @since 1.4
*/
+ @Path( "isLogged" )
+ @GET
+ @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
+ @RedbackAuthorization( noRestriction = true )
Boolean isLogged()
throws RedbackServiceException;
- @Path( "logout" )
- @GET
- @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
- @RedbackAuthorization( noRestriction = true, noPermission = true )
/**
* clear user http session
* @since 1.4
*/
+ @Path( "logout" )
+ @GET
+ @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
+ @RedbackAuthorization( noRestriction = true, noPermission = true )
Boolean logout()
throws RedbackServiceException;
}
@Path( "/passwordService/" )
public interface PasswordService
{
- @GET
- @Path( "changePasswordWithKey" )
- @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
- @RedbackAuthorization( noRestriction = true, noPermission = true )
+
/**
* used to change the password on first user connection after registration use.
* the key is mandatory and a control will be done on the username provided.
* <b>need to be logged by {@link UserService#validateUserFromKey(String)}</b>
* @return username
*/
+ @GET
+ @Path( "changePasswordWithKey" )
+ @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
+ @RedbackAuthorization( noRestriction = true, noPermission = true )
User changePasswordWithKey( @QueryParam( "password" ) String password,
@QueryParam( "passwordConfirmation" ) String passwordConfirmation,
@QueryParam( "key" ) String key )
throws RedbackServiceException;
+ /**
+ * used to change the password on passwordChangeRequired state.
+ */
@GET
@Path( "changePassword" )
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( noRestriction = true, noPermission = true )
- /**
- * used to change the password on passwordChangeRequired state.
- */
User changePassword( @QueryParam( "userName" ) String userName,
@QueryParam( "previousPassword" ) String previousPassword,
@QueryParam( "password" ) String password,
@QueryParam( "resource" ) String resource )
throws RedbackServiceException;
+ /**
+ * @since 1.4
+ */
@Path( "getEffectivelyAssignedRoles/{username}" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( permissions = RedbackRoleConstants.USER_MANAGEMENT_RBAC_ADMIN_OPERATION )
- /**
- * @since 1.4
- */
List<Role> getEffectivelyAssignedRoles( @PathParam( "username" ) String username )
throws RedbackServiceException;
+ /**
+ * @since 2.0
+ */
@Path( "allRoles" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( permissions = RedbackRoleConstants.USER_MANAGEMENT_RBAC_ADMIN_OPERATION )
- /**
- * @since 2.0
- */
List<Role> getAllRoles()
throws RedbackServiceException;
+ /**
+ * @since 2.0
+ */
@Path( "detailledAllRoles" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( permissions = RedbackRoleConstants.USER_MANAGEMENT_RBAC_ADMIN_OPERATION )
- /**
- * @since 2.0
- */
List<Role> getDetailedAllRoles()
throws RedbackServiceException;
+ /**
+ * @since 2.0
+ */
@Path( "getApplications/{username}" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( permissions = RedbackRoleConstants.USER_MANAGEMENT_RBAC_ADMIN_OPERATION )
- /**
- * @since 2.0
- */
List<Application> getApplications( @PathParam( "username" ) String username )
throws RedbackServiceException;
+ /**
+ * @since 2.0
+ */
@Path( "getRole/{roleName}" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( permissions = RedbackRoleConstants.USER_MANAGEMENT_RBAC_ADMIN_OPERATION )
- /**
- * @since 2.0
- */
Role getRole( @PathParam( "roleName" ) String roleName )
throws RedbackServiceException;
+ /**
+ * @since 2.0
+ */
@Path( "updateRoleDescription" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( permissions = RedbackRoleConstants.USER_MANAGEMENT_RBAC_ADMIN_OPERATION )
- /**
- * @since 2.0
- */
Boolean updateRoleDescription( @QueryParam( "roleName" ) String roleName,
@QueryParam( "roleDescription" ) String description )
throws RedbackServiceException;
+ /**
+ * update users assigned to a role
+ * @since 2.0
+ */
@Path( "updateRoleUsers" )
@POST
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
@Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
@RedbackAuthorization( permissions = RedbackRoleConstants.USER_MANAGEMENT_RBAC_ADMIN_OPERATION )
- /**
- * update users assigned to a role
- * @since 2.0
- */
Boolean updateRoleUsers( Role role )
throws RedbackServiceException;
+ /**
+ * @since 2.0
+ */
@Path( "getApplicationRoles/{username}" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
@RedbackAuthorization( permissions = RedbackRoleConstants.USER_MANAGEMENT_RBAC_ADMIN_OPERATION )
- /**
- * @since 2.0
- */
List<ApplicationRoles> getApplicationRoles( @PathParam( "username" ) String username )
throws RedbackServiceException;
+ /**
+ * update roles assigned to a user
+ * @since 2.0
+ */
@Path( "updateUserRoles" )
@POST
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
@Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
@RedbackAuthorization( permissions = RedbackRoleConstants.USER_MANAGEMENT_RBAC_ADMIN_OPERATION )
- /**
- * update roles assigned to a user
- * @since 2.0
- */
Boolean updateUserRoles( User user )
throws RedbackServiceException;
Boolean updateUser( User user )
throws RedbackServiceException;
+ /**
+ * @since 2.0
+ */
@Path( "lockUser/{username}" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( permissions = RedbackRoleConstants.USER_MANAGEMENT_USER_EDIT_OPERATION )
- /**
- * @since 2.0
- */
Boolean lockUser( @PathParam( "username" ) String username )
throws RedbackServiceException;
+ /**
+ * @since 2.0
+ */
@Path( "unlockUser/{username}" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( permissions = RedbackRoleConstants.USER_MANAGEMENT_USER_EDIT_OPERATION )
- /**
- * @since 2.0
- */
Boolean unlockUser( @PathParam( "username" ) String username )
throws RedbackServiceException;
+ /**
+ * @since 2.0
+ */
@Path( "passwordChangeRequired/{username}" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( permissions = RedbackRoleConstants.USER_MANAGEMENT_USER_EDIT_OPERATION )
- /**
- * @since 2.0
- */
Boolean passwordChangeRequired( @PathParam( "username" ) String username )
throws RedbackServiceException;
+ /**
+ * @since 2.0
+ */
@Path( "passwordChangeNotRequired/{username}" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( permissions = RedbackRoleConstants.USER_MANAGEMENT_USER_EDIT_OPERATION )
- /**
- * @since 2.0
- */
Boolean passwordChangeNotRequired( @PathParam( "username" ) String username )
throws RedbackServiceException;
- @Path( "updateMe" )
- @POST
- @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
- @RedbackAuthorization( noRestriction = false, noPermission = true )
/**
* update only the current user and this fields: fullname, email, password.
* the service verify the curent logged user with the one passed in the method
* @since 1.4
*/
+ @Path( "updateMe" )
+ @POST
+ @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
+ @RedbackAuthorization( noRestriction = false, noPermission = true )
Boolean updateMe( User user )
throws RedbackServiceException;
User createGuestUser()
throws RedbackServiceException;
- @Path( "registerUser" )
- @POST
- @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
- @RedbackAuthorization( noRestriction = true, noPermission = true )
/**
* if redback is not configured for email validation is required, -1 is returned as key
* @since 1.4
*/
+ @Path( "registerUser" )
+ @POST
+ @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
+ @RedbackAuthorization( noRestriction = true, noPermission = true )
RegistrationKey registerUser( UserRegistrationRequest userRegistrationRequest )
throws RedbackServiceException;
- @Path( "validateKey/{key}" )
- @GET
- @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
- @RedbackAuthorization( noRestriction = true, noPermission = true )
/**
* validate the key and the user with forcing a password change for next login.
* http session is created.
* @param key authentication key
* @since 1.4
*/
+ @Path( "validateKey/{key}" )
+ @GET
+ @Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
+ @RedbackAuthorization( noRestriction = true, noPermission = true )
Boolean validateUserFromKey( @PathParam( "key" ) String key )
throws RedbackServiceException;
+ /**
+ *
+ * @param resetPasswordRequest contains username for send a password reset email
+ * @since 1.4
+ */
@Path( "resetPassword" )
@POST
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@Consumes( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML } )
@RedbackAuthorization( noRestriction = true, noPermission = true )
- /**
- *
- * @param user username for send a password reset email
- * @since 1.4
- */
Boolean resetPassword( ResetPasswordRequest resetPasswordRequest )
throws RedbackServiceException;
+ /**
+ * @since 1.4
+ */
@Path( "getUserPermissions/{userName}" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( permissions = RedbackRoleConstants.USER_MANAGEMENT_USER_LIST_OPERATION )
- /**
- * @since 1.4
- */
Collection<Permission> getUserPermissions( @PathParam( "userName" ) String userName )
throws RedbackServiceException;
+ /**
+ * @since 1.4
+ */
@Path( "getUserOperations/{userName}" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( permissions = RedbackRoleConstants.USER_MANAGEMENT_USER_LIST_OPERATION )
- /**
- * @since 1.4
- */
Collection<Operation> getUserOperations( @PathParam( "userName" ) String userName )
throws RedbackServiceException;
+ /**
+ * @return the current logged user permissions, if no logged user guest permissions are returned
+ * @since 1.4
+ */
@Path( "getCurrentUserPermissions" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( noRestriction = true, noPermission = true )
- /**
- * return the current logged user permissions, if no logged user guest permissions are returned
- * @since 1.4
- */
Collection<Permission> getCurrentUserPermissions()
throws RedbackServiceException;
+ /**
+ * @return the current logged user operations, if no logged user guest operations are returned
+ * @since 1.4
+ */
@Path( "getCurrentUserOperations" )
@GET
@Produces( { MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN } )
@RedbackAuthorization( noRestriction = true, noPermission = true )
- /**
- * return the current logged user operations, if no logged user guest operations are returned
- * @since 1.4
- */
Collection<Operation> getCurrentUserOperations()
throws RedbackServiceException;