{"id":13343115,"url":"https://github.com/PhoneX-Security/PhoneX_XMPPServer","last_synced_at":"2025-03-12T04:32:20.064Z","repository":{"id":88223403,"uuid":"164307335","full_name":"PhoneX-Security/PhoneX_XMPPServer","owner":"PhoneX-Security","description":"Openfire XMPP server, Openfire plugin, push-server, notification server, presence server","archived":false,"fork":false,"pushed_at":"2019-01-06T13:13:27.000Z","size":25603,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-24T15:38:22.558Z","etag":null,"topics":["notification-server","openfire","plugin","presence-server","push-server","xmpp","xmpp-server"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PhoneX-Security.png","metadata":{"files":{"readme":"readme.html","changelog":"changelog.html","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-06T12:59:13.000Z","updated_at":"2019-01-06T13:43:16.000Z","dependencies_parsed_at":"2023-03-04T18:30:32.524Z","dependency_job_id":null,"html_url":"https://github.com/PhoneX-Security/PhoneX_XMPPServer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhoneX-Security%2FPhoneX_XMPPServer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhoneX-Security%2FPhoneX_XMPPServer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhoneX-Security%2FPhoneX_XMPPServer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PhoneX-Security%2FPhoneX_XMPPServer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PhoneX-Security","download_url":"https://codeload.github.com/PhoneX-Security/PhoneX_XMPPServer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243158977,"owners_count":20245668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["notification-server","openfire","plugin","presence-server","push-server","xmpp","xmpp-server"],"created_at":"2024-07-29T19:30:40.126Z","updated_at":"2025-03-12T04:32:20.045Z","avatar_url":"https://github.com/PhoneX-Security.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\"\u003e\r\n\r\n\u003chtml\u003e\r\n\u003chead\u003e\r\n\t\u003ctitle\u003eUser Service Plugin Readme\u003c/title\u003e\r\n    \u003cstyle type=\"text/css\"\u003e\r\n        BODY {\r\n            font-size : 100%;\r\n        }\r\n        BODY, TD, TH {\r\n            font-family : tahoma, verdana, arial, helvetica, sans-serif;\r\n            font-size : 0.8em;\r\n        }\r\n        H2 {\r\n             font-size : 10pt;\r\n             font-weight : bold;\r\n        }\r\n        A:hover {\r\n            text-decoration : none;\r\n        }\r\n        H1 {\r\n            font-family : tahoma, arial, helvetica, sans-serif;\r\n            font-size : 1.4em;\r\n            font-weight: bold;\r\n            border-bottom : 1px #ccc solid;\r\n            padding-bottom : 2px;\r\n        }\r\n\r\n        TT {\r\n            font-family : courier new;\r\n            font-weight : bold;\r\n            color : #060;\r\n        }\r\n        PRE {\r\n            font-family : courier new;\r\n            font-size : 100%;\r\n        }\r\n        #datatable TH {\r\n            color : #fff;\r\n            background-color : #2A448C;\r\n            text-align : left;\r\n        }\r\n        #datatable TD {\r\n            background-color : #FAF6EF;\r\n        }\r\n        #datatable .name {\r\n            background-color : #DCE2F5;\r\n        }\r\n    \u003c/style\u003e\r\n\u003c/head\u003e\r\n\u003cbody\u003e\r\n\r\n\u003ch1\u003e\r\nUser Service Plugin Readme\r\n\u003c/h1\u003e\r\n\r\n\u003ch2\u003eOverview\u003c/h2\u003e\r\n\r\n\u003cp\u003e\r\nThe User Service Plugin provides the ability to add,edit,delete users and manage their rosters by sending an http request to the server.\r\nIt is intended to be used by applications automating the user administration process.\r\nThis plugin's functionality is useful for applications that need to administer users outside of the Openfire admin console.\r\nAn example of such an application might be a live sports reporting application that uses XMPP as its transport, and\r\ncreates/deletes users according to the receipt, or non receipt, of a subscription fee.\r\n\r\n\u003c/p\u003e\r\n\r\n\u003ch2\u003eInstallation\u003c/h2\u003e\r\n\r\n\u003cp\u003eCopy userservice.jar into the plugins directory of your Openfire server. The\r\nplugin will then be automatically deployed. To upgrade to a new version, copy the new\r\nuserservice.jar file over the existing file.\u003c/p\u003e\r\n\r\n\u003ch2\u003eConfiguration\u003c/h2\u003e\r\n\r\nAccess to the service is restricted with a \"secret\" that can be viewed and\r\nset from the User Service page in the Openfire admin console.  This page is\r\nlocated on the admin console under \"Server\" and then \"Server Settings\".\r\nThis should really only be considered weak security. The plugin was initially written with the assumption that http access to the Openfire service was\r\nonly available to trusted machines. In the case of the plugin's author, a web application running on the same server as\r\nOpenfire makes the request.\r\n\r\n\u003ch2\u003eUsing the Plugin\u003c/h2\u003e\r\n\r\nTo administer users, submit HTTP requests to the userservice service.\r\nThe service address is [hostname]plugins/userService/userservice. For example,\r\nif your server name is \"example.com\", the URL is http://example.com/plugins/userService/userservice\u003cp\u003e\r\n\r\nThe following parameters can be passed into the request:\u003cp\u003e\r\n\r\n\u003cdiv id=\"datatable\"\u003e\r\n\u003ctable cellpadding=\"3\" cellspacing=\"1\" border=\"0\" width=\"900\"\u003e\r\n\u003ctr\u003e\r\n    \u003cth colspan=2\u003eName\u003c/th\u003e\u003cth\u003eDescription\u003c/th\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\r\n    \u003ctd class=\"name\"\u003etype\u003c/td\u003e\u003ctd\u003eRequired\u003c/td\u003e\u003ctd\u003eThe admin service required.\r\n    Possible values are 'add', 'delete', 'update', 'enable', 'disable', 'add_roster', 'update_roster', 'delete_roster'.\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\r\n    \u003ctd class=\"name\"\u003esecret\u003c/td\u003e\u003ctd\u003eRequired\u003c/td\u003e\r\n    \u003ctd\u003eThe secret key that allows access to the User Service.\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\r\n    \u003ctd class=\"name\"\u003eusername\u003c/td\u003e\u003ctd\u003eRequired\u003c/td\u003e\r\n    \u003ctd\u003eThe username of the user to 'add', 'delete', 'update', 'enable', 'disable', 'add_roster', 'update_roster', 'delete_roster'. ie the part before the @ symbol.\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\r\n    \u003ctd class=\"name\"\u003epassword\u003c/td\u003e\u003ctd\u003eRequired for 'add' operation\u003c/td\u003e\r\n    \u003ctd\u003eThe password of the new user or the user being updated.\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\r\n    \u003ctd class=\"name\"\u003ename\u003c/td\u003e\u003ctd\u003eOptional\u003c/td\u003e\r\n    \u003ctd\u003eThe display name of the new user or the user being updated. For 'add_roster', 'update_roster' operations specifies the nickname of the roster item.\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\r\n    \u003ctd class=\"name\"\u003eemail\u003c/td\u003e\u003ctd\u003eOptional\u003c/td\u003e\r\n    \u003ctd\u003eThe email address of the new user or the user being updated.\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\r\n    \u003ctd class=\"name\"\u003egroups\u003c/td\u003e\u003ctd\u003eOptional\u003c/td\u003e\r\n    \u003ctd\u003e\r\n    \tList of groups where the user is a member. Values are comma delimited. When used with types \"add\" or \"update\", it adds the user to shared groups and auto-creates new groups.\u003cbr/\u003e\r\n    \tWhen used with 'add_roster' and 'update_roster', it adds the user to roster groups provided the group name does not clash with an existing shared group.\r\n    \u003c/td\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\r\n    \u003ctd class=\"name\"\u003eitem_jid\u003c/td\u003e\u003ctd\u003eRequired for 'add_roster', 'update_roster', 'delete_roster' operations.\u003c/td\u003e\r\n    \u003ctd\u003eThe JID of the roster item\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\r\n    \u003ctd class=\"name\"\u003esubscription\u003c/td\u003e\u003ctd\u003eOptional\u003c/td\u003e\r\n    \u003ctd\u003eType of subscription for 'add_roster', 'update_roster' operations. Possible numeric values are: -1(remove), 0(none), 1(to), 2(from), 3(both).\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\r\n\r\n\u003c/table\u003e\u003cp\u003e\r\n\r\n\r\n\u003cp\u003e\u003cb\u003eSample HTML\u003c/b\u003e\u003cp\u003e\r\n\r\nThe following example adds a user\r\n\r\n\u003cul\u003e\r\n\u003cform\u003e\r\n\u003ctextarea cols=65 rows=3 wrap=virtual\u003e\r\nhttp://example.com:9090/plugins/userService/userservice?type=add\u0026secret=bigsecret\u0026username=kafka\u0026password=drowssap\u0026name=franz\u0026email=franz@kafka.com\r\n\u003c/textarea\u003e\r\n\u003c/form\u003e\r\n\u003c/ul\u003e\r\n\r\nThe following example adds a user, adds two shared groups (if not existing) and adds the user to both groups.\r\n\r\n\u003cul\u003e\r\n\u003cform\u003e\r\n\u003ctextarea cols=65 rows=3 wrap=virtual\u003e\r\nhttp://example.com:9090/plugins/userService/userservice?type=add\u0026secret=bigsecret\u0026username=kafka\u0026password=drowssap\u0026name=franz\u0026email=franz@kafka.com\u0026groups=support,finance\r\n\u003c/textarea\u003e\r\n\u003c/form\u003e\r\n\u003c/ul\u003e\r\n\r\nThe following example deletes a user and all roster items of the user.\r\n\r\n\u003cul\u003e\r\n\u003cform\u003e\r\n\u003ctextarea cols=65 rows=4 wrap=virtual\u003e\r\nhttp://example.com:9090/plugins/userService/userservice?type=delete\u0026secret=bigsecret\u0026username=kafka\r\n\u003c/textarea\u003e\r\n\u003c/form\u003e\r\n\u003c/ul\u003e\r\n\r\nThe following example disables a user (lockout)\r\n\r\n\u003cul\u003e\r\n\u003cform\u003e\r\n\u003ctextarea cols=65 rows=4 wrap=virtual\u003e\r\nhttp://example.com:9090/plugins/userService/userservice?type=disable\u0026secret=bigsecret\u0026username=kafka\r\n\u003c/textarea\u003e\r\n\u003c/form\u003e\r\n\u003c/ul\u003e\r\n\r\nThe following example enables a user (removes lockout)\r\n\r\n\u003cul\u003e\r\n\u003cform\u003e\r\n\u003ctextarea cols=65 rows=4 wrap=virtual\u003e\r\nhttp://example.com:9090/plugins/userService/userservice?type=enable\u0026secret=bigsecret\u0026username=kafka\r\n\u003c/textarea\u003e\r\n\u003c/form\u003e\r\n\u003c/ul\u003e\r\n\r\n\r\nThe following example updates a user\r\n\r\n\u003cul\u003e\r\n\u003cform\u003e\r\n\u003ctextarea cols=65 rows=3 wrap=virtual\u003e\r\nhttp://example.com:9090/plugins/userService/userservice?type=update\u0026secret=bigsecret\u0026username=kafka\u0026password=drowssap\u0026name=franz\u0026email=beetle@kafka.com\r\n\u003c/textarea\u003e\r\n\u003c/form\u003e\r\n\u003c/ul\u003e\r\n\r\nThe following example adds new roster item with subscription 'both' for user 'kafka'\r\n\r\n\u003cul\u003e\r\n\u003cform\u003e\r\n\u003ctextarea cols=65 rows=3 wrap=virtual\u003e\r\nhttp://example.com:9090/plugins/userService/userservice?type=add_roster\u0026secret=bigsecret\u0026username=kafka\u0026item_jid=franz@example.com\u0026name=franz\u0026subscription=3\r\n\u003c/textarea\u003e\r\n\u003c/form\u003e\r\n\u003c/ul\u003e\r\n\r\nThe following example adds new roster item with subscription 'both' for user 'kafka' and adds kafka to roster groups 'family' and 'friends'\r\n\r\n\u003cul\u003e\r\n\u003cform\u003e\r\n\u003ctextarea cols=65 rows=3 wrap=virtual\u003e\r\nhttp://example.com:9090/plugins/userService/userservice?type=add_roster\u0026secret=bigsecret\u0026username=kafka\u0026item_jid=franz@example.com\u0026name=franz\u0026subscription=3\u0026groups=family,friends\r\n\u003c/textarea\u003e\r\n\u003c/form\u003e\r\n\u003c/ul\u003e\r\n\r\nThe following example updates existing roster item to subscription 'none' for user 'kafka'\r\n\r\n\u003cul\u003e\r\n\u003cform\u003e\r\n\u003ctextarea cols=65 rows=3 wrap=virtual\u003e\r\nhttp://example.com:9090/plugins/userService/userservice?type=update_roster\u0026secret=bigsecret\u0026username=kafka\u0026item_jid=franz@example.com\u0026name=franz\u0026subscription=0\r\n\u003c/textarea\u003e\r\n\u003c/form\u003e\r\n\u003c/ul\u003e\r\n\r\nThe following example deletes a specific roster item 'franz@kafka.com' for user 'kafka'\r\n\r\n\u003cul\u003e\r\n\u003cform\u003e\r\n\u003ctextarea cols=65 rows=3 wrap=virtual\u003e\r\nhttp://example.com:9090/plugins/userService/userservice?type=delete_roster\u0026secret=bigsecret\u0026username=kafka\u0026item_jid=franz@example.com\r\n\u003c/textarea\u003e\r\n\u003c/form\u003e\r\n\u003c/ul\u003e\r\n\r\n\u003cbr\u003e\u003cbr\u003e\r\n* When sending double characters (Chinese/Japanese/Korean etc) you should URLEncode the string as utf8.\u003cbr\u003e\r\nIn Java this is done like this\u003cbr\u003e\r\nURLEncoder.encode(username, \"UTF-8\"));\r\n\u003cbr\u003eIf the strings are encoded incorrectly, double byte characters will look garbeled in the Admin Console.\r\n\r\n\r\n\u003ch2\u003eServer Reply\u003c/h2\u003e\r\n\r\nThe server will reply to all User Service requests with an XML result page.\r\nIf the request was processed successfully the return will be a \"result\" element with a text body of \"OK\".\r\nIf the request was unsuccessful, the return will be an \"error\" element with a text body of one of the following error strings.\r\n\u003cp\u003e\r\n\r\n\r\n\u003cdiv id=\"datatable\"\u003e\r\n\u003ctable cellpadding=\"3\" cellspacing=\"1\" border=\"0\" width=\"900\"\u003e\r\n\u003ctr\u003e\r\n    \u003cth \u003eError String\u003c/th\u003e\u003cth\u003eDescription\u003c/th\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\r\n    \u003ctd class=\"name\"\u003eIllegalArgumentException\u003c/td\u003e\r\n    \u003ctd\u003eone of the parameters passed in to the User Service was bad.\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\r\n    \u003ctd class=\"name\"\u003eUserNotFoundException\u003c/td\u003e\r\n    \u003ctd\u003eNo user of the name specified, for a delete or update operation, exists on this server. For 'update_roster' operation, roster item to be updated was not found.\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\r\n    \u003ctd class=\"name\"\u003eUserAlreadyExistsException\u003c/td\u003e\r\n    \u003ctd\u003eA user with the same name as the user about to be added, already exists. For 'add_roster' operation, roster item with the same JID already exists.\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\r\n    \u003ctd class=\"name\"\u003eRequestNotAuthorised\u003c/td\u003e\r\n    \u003ctd\u003eThe supplied secret does not match the secret specified in the Admin Console or the requester is not a valid IP address.\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\r\n    \u003ctd class=\"name\"\u003eUserServiceDisabled\u003c/td\u003e\r\n    \u003ctd\u003eThe User Service is currently set to disabled in the Admin Console.\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\u003ctr\u003e\r\n    \u003ctd class=\"name\"\u003eSharedGroupException\u003c/td\u003e\r\n    \u003ctd\u003eRoster item can not be added/deleted to/from a shared group for operations with roster.\u003c/td\u003e\r\n\u003c/tr\u003e\r\n\r\n\u003c/table\u003e\u003cp\u003e\r\n\r\n\r\n\u003c/body\u003e\r\n\u003c/html\u003e\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPhoneX-Security%2FPhoneX_XMPPServer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPhoneX-Security%2FPhoneX_XMPPServer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPhoneX-Security%2FPhoneX_XMPPServer/lists"}