Packages
pow_assent
0.2.1
0.4.18
0.4.17
0.4.16
0.4.15
0.4.14
0.4.13
0.4.12
0.4.11
0.4.10
0.4.9
0.4.8
0.4.7
0.4.6
0.4.5
0.4.4
0.4.3
0.4.2
0.4.1
0.4.0
0.3.2
0.3.1
0.3.0
0.2.4
0.2.3
0.2.2
0.2.1
0.2.0
0.1.0
0.1.0-rc.2
0.1.0-rc.1
0.1.0-rc.0
0.1.0-alpha.12
0.1.0-alpha.11
0.1.0-alpha.10
0.1.0-alpha.9
0.1.0-alpha.8
0.1.0-alpha.7
0.1.0-alpha.6
0.1.0-alpha.5
0.1.0-alpha.4
0.1.0-alpha.3
0.1.0-alpha.2
retired
0.1.0-alpha.1
0.1.0-alpha
Multi-provider support for Pow
Security advisory:
This version has known vulnerabilities.
View advisories
Current section
Files
Jump to
Current section
Files
lib/pow_assent/http_adapter.ex
defmodule PowAssent.HTTPAdapter do
@moduledoc false
defmodule HTTPResponse do
@moduledoc false
@type header :: {binary(), binary()}
@type t :: %__MODULE__{
status: integer(),
headers: [header()],
body: binary()
}
defstruct status: 200, headers: [], body: ""
end
@type method :: :get | :post
@type body :: binary() | nil
@type headers :: [{binary(), binary()}]
@callback request(method(), binary(), body(), headers(), Keyword.t()) :: {:ok, map()} | {:error, any()}
@spec user_agent_header() :: {binary(), binary()}
def user_agent_header() do
version = Application.spec(:pow_assent, :vsn) || "0.0.0"
{"User-Agent", "PowAssent-#{version}"}
end
end