? ? Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
24 Nov 2021

Summary of Changes

Add an authorization endpoint

Testing Instructions

apply patch
create an user that have the API Token
do a POST {{base_url}}api/index.php/v1/users/auth
with this body

{
 "username": "test",
 "password": "123456789012"
}

Actual result BEFORE applying this Pull Request

N/A

Expected result AFTER applying this Pull Request

it returns the Bearer token so an app can consume the not public webservices endpoints
image

Documentation Changes Required

yes

9516dc6 24 Nov 2021 avatar alikon auth
98541cc 24 Nov 2021 avatar alikon auth
5ed83e3 24 Nov 2021 avatar alikon auth
avatar alikon alikon - open - 24 Nov 2021
avatar alikon alikon - change - 24 Nov 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 24 Nov 2021
Category Administration com_users Front End Plugins
avatar alikon alikon - change - 24 Nov 2021
The description was changed
avatar alikon alikon - edited - 24 Nov 2021
e86ea4d 24 Nov 2021 avatar alikon cs
avatar alikon alikon - change - 24 Nov 2021
Labels Added: ? ?
b0b7cdf 24 Nov 2021 avatar alikon cs
266c9ad 24 Nov 2021 avatar alikon cs
avatar wilsonge
wilsonge - comment - 24 Nov 2021

Sorry I'm hard rejecting this - this is a security thing.

It's inherently insecure to be able to grab tokens via a webservice I'm afraid. This is also going to full on conflict with any OAuth services (which are how this stuff tends to manifest in most webservices) - which is something we've documented as something we expect to bubble up in the 3rd party ecosystem rather than in core.

avatar wilsonge wilsonge - change - 24 Nov 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-11-24 15:16:32
Closed_By wilsonge
avatar wilsonge wilsonge - close - 24 Nov 2021
avatar alikon
alikon - comment - 24 Nov 2021

where is documented ?

avatar wilsonge
wilsonge - comment - 24 Nov 2021

https://docs.joomla.org/Joomla_Api_Specification

We have chosen not to implement a full blown oAuth 2 specification into the core however it is intended that this can be achieved with the plugin group (and by disabling the "API Authentication - Joomla Token" plugin and the "User - Joomla Token" plugin)

Add a Comment

Login with GitHub to post a comment