Managing users and groups (jackrabbit.usermanager)Page edited by Felix MeschbergerManaging users and groupsThe jackrabbit-usermanager bundle delivers a REST interface to create, update and delete users and groups in the JCR. After installing the jackrabbit-usermanager bundle all REST services are exposed under the path /system/userManager. List usersTo list existing users a GET request to the /system/userManager/user resource can be posted. Depending on the configuration of the Default GET Servlet and/or the availability of a Servlet or Script handling the sling/users resource type, a result may be delivered. Example with curl and the default JSON rendering: $ curl http://localhost:8080/system/userManager/user.tidy.1.json
{
"admin": {},
"anonymous": {}
}
Responses:
Example with curl: curl -F:name=myuser -Fpwd=password -FpwdConfirm=password -Fanyproperty1=value1 \
http://localhost:8080/system/userManager/user.create.html
Update userTo update an existing user POST a request to /system/userManager/user/username.update.html. You can NOT update the username or the password (see Change Password below) only the additional properties are updateable through this URL. The following parameters are available:
Responses:
Example curl -fanyproper...@delete -Fproperty2=value2 \
http://localhost:8080/system/userManager/user/myuser.update.html
Change passwordTo change a password of an existing user POST a request to /system/userManager/user/username.changePassword.html. The following parameters are available:
Responses:
Example curl -FoldPwd=oldpassword -FnewPwd=newpassword =FnewPwdConfirm=newpassword \
http://localhost:8080/system/userManager/user/myuser.changePassword.html
Delete userTo delete an existing user POST a request to /system/userManager/user/username.delete.html. The following parameters are available:
Responses:
Example curl -Fgo=1 http://localhost:8080/system/userManager/user/myuser.delete.html List groupsTo list existing groups a GET request to the /system/userManager/group resource can be sent. Depending on the configuration of the Default GET Servlet and/or the availability of a Servlet or Script handling the sling/groups resource type, a result may be delivered. Example with curl and the default JSON rendering: $ curl http://localhost:8080/system/userManager/group.tidy.1.json
{
"UserAdmin": {},
"GroupAdmin": {},
"administrators": {}
}
Get groupThe properties of a single group can be retrieved by sending a GET request to the group's resource at /system/userManager/group/groupname where groupname would be replaced with the name of the group. Depending on the configuration of the Default GET Servlet and/or the availability of a Servlet or Script handling the sling/group resource type, a result may be delivered. Example with curl and the default JSON rendering: $ curl http://localhost:8080/system/userManager/group/administrators.tidy.1.json
{}
If a non-existing group is requested a 404/NOT FOUND status is sent back. Create groupTo create a new group POST a request to /system/userManager/group.create.html. The following parameters are available:
Responses:
Example with curl: curl -F:name=mygroup -Fanyproperty1=value1 \
http://localhost:8080/system/userManager/group.create.html
Update groupTo update an existing group POST a request to /system/userManager/group/groupname.update.html. You can NOT update the name of the group only the additional properties are updateable. The following parameters are available:
Responses:
Example curl \-fanyproper...@delete \-Fproperty2=value2 -F ":member=/system/userManager/user/myuser" \
http://localhost:8080/system/userManager/group/mygroup.update.html
Delete groupTo delete an existing group POST a request to /system/userManager/group/groupname.delete.html. The following parameters are available:
Responses:
Example curl -Fgo=1 http://localhost:8080/system/userManager/group/mygroup.delete.html Automated TestsThe launchpad/testing module contains test classes for various operations of the jackrabbit-usermanager. Such tests run as part of our continuous integration process, to demonstrate and verify the behavior of the various operations, in a way that's guaranteed to be in sync with the actual Sling core code. If you have an idea for additional tests, make sure to let us know!
Change Notification Preferences
View Online
|
View Change
|
Add Comment
|
- [CONF] Apache Sling Website > Managing users and groups (jac... confluence
- [CONF] Apache Sling Website > Managing users and groups... confluence
- [CONF] Apache Sling Website > Managing users and groups... confluence
- [CONF] Apache Sling Website > Managing users and groups... confluence
- [CONF] Apache Sling Website > Managing users and groups... confluence
- [CONF] Apache Sling Website > Managing users and groups... confluence
- [CONF] Apache Sling Website > Managing users and groups... confluence
