Community
Participate
Working Groups
While working on Bug 444501 and Bug 444779, I have found that we are mixing the case of the parameters in the Orion User API. This is a problem since JSON is case sensitive and we cannot simply interchange things like Name and name. For whatever reason, the UserHandlerV1 is using both ProtocolConstants and UserConstants to create the JSON resulting in some case mismatch in the keys. The Orion User API documentation is mostly empty at https://wiki.eclipse.org/Orion/Server_API/User_API so we can just fix it.
(In reply to Anthony Hunter from comment #0) > While working on Bug 444501 and Bug 444779, I have found that we are mixing > the case of the parameters in the Orion User API. This is a problem since > JSON is case sensitive and we cannot simply interchange things like Name and > name. > > For whatever reason, the UserHandlerV1 is using both ProtocolConstants and > UserConstants to create the JSON resulting in some case mismatch in the keys. > > The Orion User API documentation is mostly empty at > https://wiki.eclipse.org/Orion/Server_API/User_API so we can just fix it. According to our coding guidelines at https://wiki.eclipse.org/Orion/Coding_conventions#JSON , Object member names use title case ("Name", "ChildrenLocation", etc). "UserName" will replace login, name, userid, uid, etc. Other properties would be "Email", "FullName", "OpenId", etc. In addition, I will create a UserConstants in the Orion core bundle that will be used by the server code base.
I have delivered bug 444501 as phase one with the original mismatched API parameters. I will deliver this bug as a phase two since it will require server migration.
(In reply to Anthony Hunter from comment #2) > I have delivered bug 444501 as phase one with the original mismatched API > parameters. > > I will deliver this bug as a phase two since it will require server > migration. This should be handled by the latest migration in Orion 8.0. The separate "profileProperties" needs to be removed and it contents moved to be standard properties. "blocked" should be "Blocked" "diskusage" should be "DiskUsage" "diskusagetimestamp" should be "DiskUsageTimestamp" "email" should be "Email" "email_confirmation" should be "EmailConfirmation" "lastlogintimestamp" should be "LastLoginTimestamp" "oauth" should be "OAuth" "openid" should be "OpenId" "password" should be "Password" "passwordResetId" should be "PasswordResetId"
(In reply to Anthony Hunter from comment #3) > This should be handled by the latest migration in Orion 8.0. > > The separate "profileProperties" needs to be removed and it contents moved > to be standard properties. > > "blocked" should be "Blocked" > "diskusage" should be "DiskUsage" > "diskusagetimestamp" should be "DiskUsageTimestamp" > "email" should be "Email" > "email_confirmation" should be "EmailConfirmation" > "lastlogintimestamp" should be "LastLoginTimestamp" > "oauth" should be "OAuth" > "openid" should be "OpenId" > "password" should be "Password" > "passwordResetId" should be "PasswordResetId" The server side changes have been delivered with commits: http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=56d117cbcd0a3ee4cf517f64fccd180a64c7d29d http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=407439ab46581a63473c0e6ca28d437d08411c85 The Orion server metadata storage is now at Version 8.0
(In reply to Anthony Hunter from comment #3) > The separate "profileProperties" needs to be removed and it contents moved > to be standard properties. > > "blocked" should be "Blocked" > "diskusage" should be "DiskUsage" > "diskusagetimestamp" should be "DiskUsageTimestamp" > "email" should be "Email" > "email_confirmation" should be "EmailConfirmation" > "lastlogintimestamp" should be "LastLoginTimestamp" > "oauth" should be "OAuth" > "openid" should be "OpenId" > "password" should be "Password" > "passwordResetId" should be "PasswordResetId" I removed all the TODOs from the server with commit: http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=1efdb1cf9eae13f4bdfb4722d825ce2432f892b4 The client now uses the newer server API with commit: http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=c0ddeb407f3871c8673d584ca8d92bd6b7fed32e
I have pushed the last set of changes that completes the clean up of the users API and login API. I have updated our server API at: http://wiki.eclipse.org/Orion/Server_API/Login_API http://wiki.eclipse.org/Orion/Server_API/User_API Let me know if there are any comments. Significant changes: Object member names in JSON use title case ("UserName", "HasPassword", etc). ( See https://wiki.eclipse.org/Orion/Coding_conventions#JSON ). A user account has a UserName and FullName, old terms login, uid and name have been removed from the JSON. It is now /login/form?username=${username}&password=${password} to login to the server, old value was login= ( and I changed it back from Password= from last week). As much as possible we use JSON within the APIs rather than query parameters A reminder that you need to rebase your org.eclipse.orion.client repo for self hosting to work again. These were commits: http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=6c1bc5ba730d526b43eb7e9f037eced2020f6671 http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=97cb677133dd2ea4c7cdb4c57a8a3aa6245416cc