enonic / xp

Enonic XP
https://enonic.com
GNU General Public License v3.0
202 stars 34 forks source link

LoginParams password is optional, but throws Parameter 'password' is required #10487

Open ComLock opened 6 months ago

ComLock commented 6 months ago
login({
    user: 'blablabla'
});

Throws:

2024-03-27 12:54:35,459 ERROR c.e.xp.portal.impl.main.MainExecutor - Error while executing com.acme.example.tsup Application controller
java.util.concurrent.CompletionException: com.enonic.xp.resource.ResourceProblemException: Parameter 'password' is required

Documentation is unclear: https://developer.enonic.com/docs/xp/stable/api/lib-auth#login

ComLock commented 6 months ago

Also LoginResult message should be optional

rymsha commented 6 months ago

It actually might be optional - when skipAuth is true

ComLock commented 6 months ago

Which can be reflected in the type, and isn't currently

rymsha commented 6 months ago

PR is very welcome

Also LoginResult message should be optional

Fixed separately https://github.com/enonic/xp/issues/10497