DiscordOauth2Server

Elixir server using Discord OAuth2 service and an existing database to provide JWS token.

Fear The C{ode}

It acts as a proxy. From the client side, simply redirects to the /login endpoint, which will then

Discord OAuth2 Server - Sequence Diagram

Dependencies

Elixir platform

Supported Databases

Only PostgreSQL with Postgrex is supported at this time, as no abstractions has been implemented (yet) to easily swap between DBs and drivers.

Supported encryption

As of now, the server provides ECDSA-like signed JWS. A little more development may be necessary to support more algorithms.

Quick Start

Exemples

/ping

{
  "status": "ok",
  "timestamp": "1537360546"
}

/public_keys

{
  "keys": {
    "crv": "P-521",
    "kty": "EC",
    "x": "ABeULuyYwEDVAkJtgNvgeG0v6rNtKDOYkKUMqjJyR-aCfjbkPpsl2MZXVdsjNR31oGbCB4gT5qpgjiXgqqqT5BRC",
    "y": "AdDA3RxRlGzy0chCTKaWQffWx9xBDrOPKf_TgpzlfdJw9QykNCguvAQeE7ZrzwPcAziRAQcVmorzPpGioR96VsY6"
  },
  "status": "ok"
}

FTC Bot system diagram