Implementation of a basic auth logic via API #2

Open
optclblast wants to merge 11 commits from base-auth into master
2 changed files with 12 additions and 0 deletions
Showing only changes of commit 34429ce640 - Show all commits

View File

@ -17,5 +17,7 @@ defmodule DrainCloudCore.Auth.SessionsStore do
end
def initialize_session(conn, user) do
end
end

View File

@ -9,6 +9,16 @@ defmodule DrainCloudCoreWeb.AuthController do
alias DrainCloudCore.Auth.Users , as: Repo
def register(conn, _params) do
Log.debug(
Enum.find_value(conn.req_headers, "", fn x ->
case x do
{"user-agent", agent} -> agent
_ -> nil
end
end)
|> inspect
)
try do
RegisterRequest.from_request(conn)
|> RegisterRequest.to_model