Skip to content

Commit de40cdb

Browse files
authored
Merge branch 'master' into feat/add_show_admin_endpoint
2 parents 1821b65 + 134a5a1 commit de40cdb

File tree

34 files changed

+726
-110
lines changed

34 files changed

+726
-110
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ jobs:
109109
uses: actions/cache@v2
110110
id: plt-cache
111111
with:
112-
path: dializer/
112+
path: dializer/plts/
113113
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-plts-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
114114

115115
- name: Generate PLT
116116
if: steps.plt-cache.outputs.cache-hit != 'true'
117117
run: |
118-
mkdir -p dialyzer/
118+
mkdir -p dialyzer/plts/
119119
mix dialyzer --plt
120120
121121
- name: Run dialyzer

.gitignore

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44
# If you run "mix test --cover", coverage assets end up here.
55
/cover/
66

7-
# The directory Mix downloads your dependencies sources to.
8-
/deps/
9-
107
# The directory where the files will be saved on every build.
118
/dialyzer/
129

10+
# The directory Mix downloads your dependencies sources to.
11+
/deps/
12+
1313
# Where third-party dependencies like ExDoc output generated docs.
1414
/doc/
1515

16+
# Releases enviroments and configurations
17+
/rel/
18+
1619
# Ignore .fetch files in case you like to edit your project deps locally.
1720
/.fetch
1821

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# WatcherEx ![Build](https://github.com/lcpojr/watcher_ex/workflows/CI/badge.svg) [![Coverage](https://coveralls.io/repos/github/lcpojr/watcher_ex/badge.svg)](https://coveralls.io/github/lcpojr/watcher_ex)
22

3-
**This is a work in progress and every contribution is welcome :)**
3+
WatcherEx is an Oauth2 provider made entirely in elixir.
4+
We have an initial implementation of some oauth2 most common flows as:
5+
6+
- [Resource Owner](https://tools.ietf.org/html/rfc6749#page-9);
7+
- [Refresh Token](https://tools.ietf.org/html/rfc6749#section-1.5);
8+
- [Client Credentials](https://tools.ietf.org/html/rfc6749#page-9);
49

510
## Requirements
611

@@ -35,7 +40,7 @@ ResourceManager.Repo.all(ResourceManager.Identities.Schemas.ClientApplication) |
3540

3641
### Making requests
3742

38-
Check out the [rest api guide](https://github.com/lcpojr/watcher_ex/blob/master/apps/rest_api/README.md) on the specific application `README.md`.
43+
Check out the [rest api guide](https://github.com/lcpojr/watcher_ex/blob/master/apps/rest_api/README.md) on the specific application `README.md` or you can check it out on or live example [here](https://watcherex.gigalixirapp.com/api/v1/swagger/index.html).
3944

4045
### Testing
4146

VERSION.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.1.0

apps/authenticator/lib/sessions/manager.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ defmodule Authenticator.Sessions.Manager do
3535
@spec start_link(args :: keyword()) :: {:ok, pid()} | :ignore | {:error, keyword()}
3636
def start_link(args \\ []), do: GenServer.start_link(__MODULE__, args, name: __MODULE__)
3737

38-
@doc "Checks #{__MODULE__} actual state"
38+
@doc "Checks GenServer actual state"
3939
@spec check(process_id :: pid() | __MODULE__) :: state()
4040
def check(pid \\ __MODULE__), do: GenServer.call(pid, :check)
4141

apps/authenticator/mix.exs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
defmodule Authenticator.MixProject do
22
use Mix.Project
33

4+
@version_file "../../VERSION.txt"
5+
46
def project do
57
[
68
app: :authenticator,
7-
version: "0.1.0",
9+
version: version(),
810
build_path: "../../_build",
911
config_path: "../../config/config.exs",
1012
elixirc_paths: elixirc_paths(Mix.env()),
@@ -18,6 +20,12 @@ defmodule Authenticator.MixProject do
1820
]
1921
end
2022

23+
defp version do
24+
@version_file
25+
|> File.read!()
26+
|> String.trim()
27+
end
28+
2129
def application do
2230
[
2331
mod: {Authenticator.Application, []},
@@ -48,6 +56,7 @@ defmodule Authenticator.MixProject do
4856
{:ecto_sql, "~> 3.4"},
4957

5058
# Tools
59+
{:junit_formatter, "~> 3.1", only: [:test]},
5160
{:dialyxir, "~> 1.0", only: :dev, runtime: false},
5261
{:credo, "~> 1.4", only: [:dev, :test], runtime: false},
5362
{:ex_doc, "~> 0.22", only: :dev, runtime: false},

apps/authenticator/test/test_helper.exs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
ExUnit.configure(formatters: [JUnitFormatter])
12
ExUnit.start()
23

34
Ecto.Adapters.SQL.Sandbox.mode(Authenticator.Repo, :manual)

apps/authorizer/mix.exs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
defmodule Authorizer.MixProject do
22
use Mix.Project
33

4+
@version_file "../../VERSION.txt"
5+
46
def project do
57
[
68
app: :authorizer,
7-
version: "0.1.0",
9+
version: version(),
810
build_path: "../../_build",
911
config_path: "../../config/config.exs",
1012
elixirc_paths: elixirc_paths(Mix.env()),
@@ -17,6 +19,12 @@ defmodule Authorizer.MixProject do
1719
]
1820
end
1921

22+
defp version do
23+
@version_file
24+
|> File.read!()
25+
|> String.trim()
26+
end
27+
2028
# Run "mix help compile.app" to learn about applications.
2129
def application do
2230
[
@@ -39,6 +47,7 @@ defmodule Authorizer.MixProject do
3947
{:plug_cowboy, "~> 2.0"},
4048

4149
# Tools
50+
{:junit_formatter, "~> 3.1", only: [:test]},
4251
{:dialyxir, "~> 1.0", only: :dev, runtime: false},
4352
{:credo, "~> 1.4", only: [:dev, :test], runtime: false},
4453
{:ex_doc, "~> 0.22", only: :dev, runtime: false},
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
ExUnit.configure(formatters: [JUnitFormatter])
12
ExUnit.start()

apps/resource_manager/lib/credentials/blocklist_password_manager.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ defmodule ResourceManager.Credentials.BlocklistPasswordManager do
3131
@spec start_link(args :: keyword()) :: {:ok, pid()} | :ignore | {:error, keyword()}
3232
def start_link(args \\ []), do: GenServer.start_link(__MODULE__, args, name: __MODULE__)
3333

34-
@doc "Checks #{__MODULE__} actual state"
34+
@doc "Checks GenServer actual state"
3535
@spec check(process_id :: pid() | __MODULE__) :: state()
3636
def check(pid \\ __MODULE__), do: GenServer.call(pid, :check)
3737

0 commit comments

Comments
 (0)