Skip to content

Commit bba4ac5

Browse files
committed
fix warning and fix purging
1 parent 992400a commit bba4ac5

File tree

5 files changed

+2
-7
lines changed

5 files changed

+2
-7
lines changed

lib/guardian/db/adapter.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ defmodule Guardian.DB.Adapter do
66
for Guardian Tokens.
77
"""
88

9-
@typep query :: Ecto.Query.t()
9+
1010
@typep schema :: Ecto.Schema.t()
1111
@typep changeset :: Ecto.Changeset.t()
1212
@typep schema_or_changeset :: schema() | changeset()
1313
@typep claims :: map()
1414
@typep exp :: pos_integer()
1515
@typep sub :: binary()
1616
@typep opts :: keyword()
17-
@typep id :: pos_integer() | binary() | Ecto.UUID.t()
17+
1818

1919
@doc """
2020
Retrieves JWT token

lib/guardian/db/ecto_adapter.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ defmodule Guardian.DB.EctoAdapter do
6464
def purge_expired_tokens(timestamp, opts) do
6565
prefix = Keyword.get(opts, :prefix, nil)
6666
repo = Keyword.get(opts, :repo)
67-
timestamp = Guardian.timestamp()
6867

6968
opts
7069
|> query_schema()

lib/guardian/db/ets_adapter.ex

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ defmodule Guardian.DB.ETSAdapter do
7575
|> delete_many(table)
7676
end
7777

78-
defp expired_tokens({_jti, _aud, _sub, token}, exp), do: token.exp < exp
79-
8078
defp delete_many(tokens, table) do
8179
deleted_tokens =
8280
Enum.reduce(tokens, [], fn [jti, token], acc ->

lib/guardian/db/token.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ defmodule Guardian.DB.Token do
55

66
use Ecto.Schema
77
import Ecto.Changeset
8-
import Ecto.Query, only: [where: 3]
98

109
alias Guardian.DB.Token
1110

lib/mix/tasks/guardian_db.gen.migration.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ defmodule Mix.Tasks.Guardian.Db.Gen.Migration do
1111

1212
import Mix.Ecto
1313
import Mix.Generator
14-
alias Guardian.DB.Token
1514

1615
@doc false
1716
def run(args) do

0 commit comments

Comments
 (0)