lcpojr / watcher_ex

An Oauth2 server interelly in elixir.
Apache License 2.0
10 stars 3 forks source link
elixir oauth2 phoenix resource-server

WatcherEx Build Coverage

WatcherEx is an Oauth2 provider made entirely in elixir. We have an initial implementation of some oauth2 most common flows as:

Requirements

Running it locally

In order to prepare the application run:

Now that you have everything configured you can just call mix phx.server to get all applications running. The service will be available at localhost:4000.

Seeding the database

You can run the seeds in order to create an user and application for tests by using mix seed. To get the user and application data check out the database on localhost:8181 or run the project with using (iex -S mix phx.server) and execute the commands bellow.

# Getting all user identities
# The user password will be `admin`
ResourceManager.Repo.all(ResourceManager.Identities.Schemas.User) |> ResourceManager.Repo.preload([:scopes])

# Getting all client application identities
# Check out for the client secret
ResourceManager.Repo.all(ResourceManager.Identities.Schemas.ClientApplication) |> ResourceManager.Repo.preload([:scopes])

Making requests

Check out the rest api guide on the specific application README.md or you can check it out on or live example here.

Testing

Before you can run the tests you should setup the test dabatase by using mix test_setup. After that just call mix test or mix coveralls if you want to check code coverage.

Code Quality

We use some libraries in order to keep our code as consistent as possible.