Packages
pow_assent
0.3.2
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/ecto/user_identities/schema/fields.ex
defmodule PowAssent.Ecto.UserIdentities.Schema.Fields do
@moduledoc """
Handles the Ecto schema fields for user.
"""
alias PowAssent.Config
@doc """
List of attributes for the ecto schema.
"""
@spec attrs(Config.t()) :: [tuple()]
def attrs(_config) do
[
{:provider, :string, null: false},
{:uid, :string, null: false}
]
end
@doc """
List of associations for the ecto schema.
"""
@spec assocs(Config.t()) :: [tuple()]
def assocs(_config) do
[{:belongs_to, :user, :users}]
end
@doc """
List of indexes for the ecto schema.
"""
@spec indexes(Config.t()) :: [tuple()]
def indexes(_config) do
[{[:uid, :provider], true}]
end
end