Implementation of a basic auth logic via API #2
@ -17,5 +17,7 @@ defmodule DrainCloudCore.Auth.SessionsStore do
|
||||
|
||||
end
|
||||
|
||||
def initialize_session(conn, user) do
|
||||
|
||||
end
|
||||
end
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user