Skip to content

Endpoints for authenticating an application with user credentials #58

@Osiris-Team

Description

@Osiris-Team

Example:
https://api.spigotmc.org/simple/0.2/index.php?action=login&username=John&password=JohnsPassword123
The above url responds with something like this:

{
  "access-token": "9hu88asch90asf79hasf89hsh89ßadh98ßas",
  "expiration-date": "timestamp in miliseconds"
}

The returned access-token can then be used for following requests by the application to do stuff on behalf of the user or fetch private user information like the bought plugins.

Alternatively, we could do it similar to how GitHub does it, by letting the user create access-tokens with specified permissions on spigotmc.org when logged in. The user then gives that token to the application, so there is no need of sharing the actual credentials.

My use case would be the following:

I have been working on a software called AutoPlug for some time.
AutoPlug simplifies server maintenance and among other things, you can automatically update spigot plugins.
Since there is no rest-api for authenticating users I can't provide premium plugin updating for my users, but
I have found a way to simulate a headless browser via Java and use it to login my users to spigotmc.org.
But this method is quite time-consuming, resource intensive and unnecessary. So it would be really
advantageous for everyone if there was an endpoint like in the example above available.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions