Skip to content

Commit

Permalink
Merge pull request #151 from dwyl/update-dependency-b58
Browse files Browse the repository at this point in the history
update all dependencies
  • Loading branch information
nelsonic authored Oct 12, 2021
2 parents 820b80c + be97151 commit 3a9d687
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 33 deletions.
2 changes: 2 additions & 0 deletions lib/auth/apikey.ex
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ defmodule Auth.Apikey do
`decode_decrypt/1` accepts a `key` and attempts to Base58.decode
followed by AES.decrypt it. If decode or decrypt fails, return 0 (zero).
"""
def decode_decrypt(nil), do: 0
def decode_decrypt(0), do: 0
def decode_decrypt(key) do
try do
key |> Base58.decode() |> Fields.AES.decrypt() |> String.to_integer()
Expand Down
3 changes: 1 addition & 2 deletions lib/auth_web/controllers/auth_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ defmodule AuthWeb.AuthController do
conn = update_in(conn.assigns, &Map.drop(&1, [:person, :jwt]))

conn
|> Auth.Log.error(Map.merge(params , %{status: 401, msg: msg}))
|> Auth.Log.error(Map.merge(params, %{status: 401, msg: msg}))
|> put_flash(:error, msg)
# force re-auth as for a different app with different roles, etc.
|> index(params)
Expand Down Expand Up @@ -222,7 +222,6 @@ defmodule AuthWeb.AuthController do
def google_handler(conn, %{"code" => code, "state" => state}) do
{:ok, token} = ElixirAuthGoogle.get_token(code, conn)
{:ok, profile} = ElixirAuthGoogle.get_user_profile(token.access_token)

# save profile to people:
app_id = get_app_id(state)
person = Person.create_google_person(Map.merge(profile, %{app_id: app_id}))
Expand Down
20 changes: 9 additions & 11 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Auth.Mixfile do
def project do
[
app: :auth,
version: "1.5.0",
version: "1.6.0",
elixir: "~> 1.12.3",
elixirc_paths: elixirc_paths(Mix.env()),
compilers: [:phoenix, :gettext] ++ Mix.compilers(),
Expand Down Expand Up @@ -46,7 +46,7 @@ defmodule Auth.Mixfile do
defp deps do
[
# Phoenix core:
{:phoenix, "~> 1.6.0"},
{:phoenix, "~> 1.6.2"},
{:phoenix_ecto, "~> 4.4"},
{:ecto_sql, "~> 3.7.0"},
{:postgrex, ">= 0.0.0"},
Expand All @@ -55,7 +55,7 @@ defmodule Auth.Mixfile do
{:phoenix_live_view, "~> 0.16.4"},
{:floki, ">= 0.30.0", only: :test},
{:phoenix_live_dashboard, "~> 0.5"},
{:esbuild, "~> 0.2", runtime: Mix.env() == :dev},
{:esbuild, "~> 0.3", runtime: Mix.env() == :dev},
{:swoosh, "~> 1.3"},
{:telemetry_metrics, "~> 0.6"},
{:telemetry_poller, "~> 1.0"},
Expand All @@ -76,24 +76,24 @@ defmodule Auth.Mixfile do
# Field Validation and Encryption: github.com/dwyl/fields
{:fields, "~> 2.8.2"},
# Base58 Encodeing: https://github.com/dwyl/base58
{:B58, "~> 1.0", hex: :b58},
{:b58, "~>1.0.2"},
# Useful functions: https://github.com/dwyl/useful
{:useful, "~> 0.2.0"},
{:useful, "~> 0.4.0"},

# Ping to Wake Heroku Instance: https://github.com/dwyl/ping
{:ping, "~> 1.1.0"},

# Check test coverage
{:excoveralls, "~> 0.12.3", only: :test},
{:excoveralls, "~> 0.14.3", only: :test},

# Property based tests: github.com/dwyl/learn-property-based-testing
{:stream_data, "~> 0.4.3", only: :test},
{:stream_data, "~> 0.5.0", only: :test},

# Create Documentation for publishing Hex.docs:
{:ex_doc, "~> 0.21.3", only: :dev},
{:ex_doc, "~> 0.25.3", only: :dev},
{:credo, "~> 1.4", only: [:dev], runtime: false},
{:dialyxir, "~> 1.0", only: [:dev], runtime: false},
{:sobelow, "~> 0.10.2", only: [:dev]}
{:sobelow, "~> 0.11.1", only: [:dev]}
]
end

Expand Down Expand Up @@ -124,5 +124,3 @@ defmodule Auth.Mixfile do
]
end
end


Loading

0 comments on commit 3a9d687

Please sign in to comment.