In the context of issue #156,
I observe that certain authentication errors are caught by a general exception such as “duplicate user name” or “duplicate user id.”
For example, if the user already exists (duplicate user id) or is pending, the gateway returns a “duplicate user name.” I believe this does not provide precise information and that the message could be adapted depending on the case.
We will create a pull request to manage pending status error with OAuth2 user, but the following use case will be not covered in this PR :
- create a user with classic geOrchestra form
- Use will be pending by default
- Try to sign in
Here, gateway will try to create user again :
|
accountDao.insert(newAccount); |
- You will have an invalid user login or password message (
invalid_credentials code)
The error will be triggered because the user already exists :
|
throw new DuplicatedUsernameFoundException(accountError.getMessage()); |

In the context of issue #156,
I observe that certain authentication errors are caught by a general exception such as “duplicate user name” or “duplicate user id.”
For example, if the user already exists (duplicate user id) or is pending, the gateway returns a “duplicate user name.” I believe this does not provide precise information and that the message could be adapted depending on the case.
We will create a pull request to manage pending status error with OAuth2 user, but the following use case will be not covered in this PR :
Here, gateway will try to create user again :
georchestra-gateway/gateway/src/main/java/org/georchestra/gateway/accounts/admin/ldap/LdapAccountsManager.java
Line 207 in b388a9e
invalid_credentialscode)The error will be triggered because the user already exists :
georchestra-gateway/gateway/src/main/java/org/georchestra/gateway/accounts/admin/ldap/LdapAccountsManager.java
Line 213 in b388a9e