OAuth1 icon indicating copy to clipboard operation
OAuth1 copied to clipboard

Is there a JSON endpoint for a list of authorized applications?

Open kosso opened this issue 10 years ago • 2 comments

I don't seem to be able to see an authorized endpoint for returning a JSON list of authorized applications.

The only other place this list is created that I can see is within the user profile table, for revoking tokens.

Shouldn't there be a JSON endpoint for this, that could then be possibly embedded within the /me.json in WPI-API?

kosso avatar Dec 07 '15 17:12 kosso

Hmm, not a bad idea. I'm not sure we should allow users to create/modify applications or revoke tokens via the API, but read-only data should be fine.

rmccue avatar Dec 08 '15 01:12 rmccue

Hi, That was going to be my next question : Is it possible for an administrator to create an application via an authenticated request via the API?

eg: I am writing a plugin which will accompany a mobile app. For now, it adds some Javascript to the edit application page to insert a QRCode on the fly, which the mobile app needs to scan in its setup phase. The code contains the key/secret/name of the consumer. Once the app has that info, it then offers the standard OAuth flow for a user to log in and authorise the app to make posts/upload media etc.

What would be nice is if I could get the plugin to create/remove that app on activation/deactivation. Is there a hook for that?

Also, I would have thought we'd also want a way to revoke tokens via the API too, since people will want to build their own UI for that too, when they build things with the API itself (including backend admin functionality)?

kosso avatar Dec 08 '15 10:12 kosso