humhub / rest

HumHub Rest API Module
24 stars 24 forks source link

Refactor Bearer Auth #112

Closed gevorgmansuryan closed 1 year ago

gevorgmansuryan commented 1 year ago

@luke- Okay Will be done. What if we make jwt auth configurable and add enableJwtAuth checkbox like others?

luke- commented 1 year ago

@gevorgmansuryan Thanks, looks really nice.

Here some points: image image image

Tests & Swagger Docs would also be good, especially for the tokens.

gevorgmansuryan commented 1 year ago

@luke- Enabled users used for JWT auth only.

luke- commented 1 year ago

@gevorgmansuryan

@luke- Enabled users used for JWT auth only.

This means that with Basic Auth all users are currently always enabled? I think it would be good to change this, and with authentication by Username & Password (Basic Auth & JWT), always allow the activated users or if checked all users.

image

gevorgmansuryan commented 1 year ago

@luke-

This means that with Basic Auth all users are currently always enabled?

Yes, it's always worked in this way

Okay Will add user check for Basic Auth too, + hint

gevorgmansuryan commented 1 year ago

@luke-

query param auth

Yes. It will work when bearer auth is enabled. When bearer auth checkbox is unchecked it will uncheck too. It is not possible to check query param auth checkbox without checking bearer auth checkbox

gevorgmansuryan commented 1 year ago

@luke- 8F0FACAB-43C5-48FC-9107-3ADDC44EC5AB

luke- commented 1 year ago

@gevorgmansuryan Can you please check the tests?

Currently only this test should fail: https://github.com/humhub/rest/issues/114

@luke- 8F0FACAB-43C5-48FC-9107-3ADDC44EC5AB 8F0FACAB-43C5-48FC-9107-3ADDC44EC5AB

@gevorgmansuryan Looks very good. Thank you!