WatcherEx is an Oauth2 provider made entirely in elixir. We have an initial implementation of some oauth2 most common flows as:
- Elixir
1.12
; - Erlang
24.0
; - Docker-compose (Just when running in dev enviroment);
In order to prepare the application run:
docker-compose up
to get your containers running;mix deps.get
to get all project dependencies;mix setup
to create the database and run all migrations;
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
.
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])
Check out the rest api guide on the specific application README.md
or you can check it out on or live example here.
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.
We use some libraries in order to keep our code as consistent as possible.