Skip to content

Commit 6520c1d

Browse files
committed
Format using newest styler
1 parent 3ec6d68 commit 6520c1d

File tree

4 files changed

+25
-25
lines changed

4 files changed

+25
-25
lines changed

lib/mix/tasks/oidcc_plug.gen.controller.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,14 +179,14 @@ case Code.ensure_loaded(Igniter.Mix.Task) do
179179

180180
html_template_path =
181181
Path.join([
182-
igniter |> Igniter.Project.Module.proper_location(web_module) |> Path.rootname(".ex"),
182+
igniter |> Module.proper_location(web_module) |> Path.rootname(".ex"),
183183
"controllers",
184184
html_path
185185
])
186186

187187
page_html_template_path =
188188
Path.join([
189-
igniter |> Igniter.Project.Module.proper_location(web_module) |> Path.rootname(".ex"),
189+
igniter |> Module.proper_location(web_module) |> Path.rootname(".ex"),
190190
"controllers",
191191
"page_html"
192192
])

lib/oidcc/plug/authorization_callback.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ defmodule Oidcc.Plug.AuthorizationCallback do
329329
client_context :: ClientContext.t(),
330330
retrieve_userinfo? :: boolean(),
331331
token_opts :: :oidcc_token.retrieve_opts()
332-
) :: {:ok, Oidcc.Token.t()} | {:error, error()}
332+
) :: {:ok, Token.t()} | {:error, error()}
333333
defp retrieve_token(code, client_context, retrieve_userinfo?, token_opts) do
334334
case Token.retrieve(code, client_context, token_opts) do
335335
{:ok, token} -> {:ok, token}
@@ -339,13 +339,13 @@ defmodule Oidcc.Plug.AuthorizationCallback do
339339
end
340340

341341
@spec retrieve_userinfo(
342-
token :: Oidcc.Token.t(),
342+
token :: Token.t(),
343343
client_context :: ClientContext.t(),
344344
userinfo_opts :: :oidcc_userinfo.retrieve_opts(),
345345
retrieve_userinfo? :: true
346346
) :: {:ok, :oidcc_jwt_util.claims()} | {:error, error()}
347347
@spec retrieve_userinfo(
348-
token :: Oidcc.Token.t(),
348+
token :: Token.t(),
349349
client_context :: ClientContext.t(),
350350
userinfo_opts :: :oidcc_userinfo.retrieve_opts(),
351351
retrieve_userinfo? :: false

lib/oidcc/plug/introspect_token.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ defmodule Oidcc.Plug.IntrospectToken do
5858
client_id: String.t() | (-> String.t()),
5959
client_secret: String.t() | (-> String.t()),
6060
token_introspection_opts: :oidcc_token_introspection.opts(),
61-
send_inactive_token_response: (conn :: Plug.Conn.t(), introspection :: Oidcc.TokenIntrospection.t() ->
61+
send_inactive_token_response: (conn :: Plug.Conn.t(), introspection :: TokenIntrospection.t() ->
6262
Plug.Conn.t()),
6363
cache: Oidcc.Plug.Cache.t()
6464
]
@@ -103,10 +103,10 @@ defmodule Oidcc.Plug.IntrospectToken do
103103
cache = Keyword.fetch!(opts, :cache)
104104

105105
case cache.get(:introspection, access_token, conn) do
106-
{:ok, %Oidcc.TokenIntrospection{active: true} = introspection} ->
106+
{:ok, %TokenIntrospection{active: true} = introspection} ->
107107
put_private(conn, __MODULE__, introspection)
108108

109-
{:ok, %Oidcc.TokenIntrospection{active: false} = introspection} ->
109+
{:ok, %TokenIntrospection{active: false} = introspection} ->
110110
conn
111111
|> put_private(__MODULE__, introspection)
112112
|> send_inactive_token_response.(introspection)
@@ -144,7 +144,7 @@ defmodule Oidcc.Plug.IntrospectToken do
144144
@doc false
145145
@spec send_inactive_token_response(
146146
conn :: Plug.Conn.t(),
147-
introspection :: Oidcc.TokenIntrospection.t()
147+
introspection :: TokenIntrospection.t()
148148
) :: Plug.Conn.t()
149149
def send_inactive_token_response(conn, _introspection) do
150150
conn

test/oidcc/plug/authorization_callback_test.exs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
1414
doctest AuthorizationCallback
1515

1616
setup_with_mocks([
17-
{Oidcc.ClientContext, [:passthrough],
17+
{ClientContext, [:passthrough],
1818
[
1919
from_configuration_worker: fn _provider, _client_id, _client_secret, _opts ->
2020
{:ok, provider_configuration} =
@@ -73,7 +73,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
7373
assert %{
7474
halted: false,
7575
private: %{
76-
Oidcc.Plug.AuthorizationCallback => {:ok, {:token, %{"sub" => "sub"}}}
76+
AuthorizationCallback => {:ok, {:token, %{"sub" => "sub"}}}
7777
}
7878
} =
7979
"get"
@@ -107,7 +107,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
107107

108108
assert %{
109109
halted: false,
110-
private: %{Oidcc.Plug.AuthorizationCallback => {:ok, {:token, nil}}}
110+
private: %{AuthorizationCallback => {:ok, {:token, nil}}}
111111
} =
112112
"get"
113113
|> conn("/", %{"code" => "code"})
@@ -135,7 +135,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
135135

136136
assert %{
137137
halted: false,
138-
private: %{Oidcc.Plug.AuthorizationCallback => {:error, :useragent_mismatch}}
138+
private: %{AuthorizationCallback => {:error, :useragent_mismatch}}
139139
} =
140140
"get"
141141
|> conn("/", %{"code" => "code"})
@@ -163,7 +163,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
163163

164164
assert %{
165165
halted: false,
166-
private: %{Oidcc.Plug.AuthorizationCallback => {:error, :peer_ip_mismatch}}
166+
private: %{AuthorizationCallback => {:error, :peer_ip_mismatch}}
167167
} =
168168
"get"
169169
|> conn("/", %{"code" => "code"})
@@ -211,7 +211,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
211211
assert %{
212212
halted: false,
213213
private: %{
214-
Oidcc.Plug.AuthorizationCallback => {:ok, {:token, nil}}
214+
AuthorizationCallback => {:ok, {:token, nil}}
215215
}
216216
} =
217217
conn
@@ -253,7 +253,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
253253
assert %{
254254
halted: false,
255255
private: %{
256-
Oidcc.Plug.AuthorizationCallback => {:ok, {:token, %{"sub" => "sub"}}}
256+
AuthorizationCallback => {:ok, {:token, %{"sub" => "sub"}}}
257257
}
258258
} =
259259
"get"
@@ -284,7 +284,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
284284
assert %{
285285
halted: false,
286286
private: %{
287-
Oidcc.Plug.AuthorizationCallback => {:error, {:missing_request_param, "code"}}
287+
AuthorizationCallback => {:error, {:missing_request_param, "code"}}
288288
}
289289
} =
290290
"get"
@@ -324,7 +324,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
324324
assert %{
325325
halted: false,
326326
private: %{
327-
Oidcc.Plug.AuthorizationCallback => {:ok, {:token, %{"sub" => "sub"}}}
327+
AuthorizationCallback => {:ok, {:token, %{"sub" => "sub"}}}
328328
}
329329
} =
330330
"get"
@@ -343,7 +343,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
343343

344344
assert %{
345345
halted: false,
346-
private: %{Oidcc.Plug.AuthorizationCallback => {:error, :state_not_verified}}
346+
private: %{AuthorizationCallback => {:error, :state_not_verified}}
347347
} =
348348
"get"
349349
|> conn("/", %{"code" => "code", "state" => "state"})
@@ -362,7 +362,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
362362
assert %{
363363
halted: false,
364364
private: %{
365-
Oidcc.Plug.AuthorizationCallback => {:ok, {:token, %{"sub" => "sub"}}}
365+
AuthorizationCallback => {:ok, {:token, %{"sub" => "sub"}}}
366366
}
367367
} =
368368
"get"
@@ -403,7 +403,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
403403
assert %{
404404
halted: false,
405405
private: %{
406-
Oidcc.Plug.AuthorizationCallback => {:ok, {:token, %{"sub" => "sub"}}}
406+
AuthorizationCallback => {:ok, {:token, %{"sub" => "sub"}}}
407407
}
408408
} =
409409
"get"
@@ -438,7 +438,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
438438

439439
assert %{
440440
halted: false,
441-
private: %{Oidcc.Plug.AuthorizationCallback => {:error, {:none_alg_used, :token}}}
441+
private: %{AuthorizationCallback => {:error, {:none_alg_used, :token}}}
442442
} =
443443
"get"
444444
|> conn("/", %{"code" => "code"})
@@ -469,7 +469,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
469469

470470
assert %{
471471
halted: false,
472-
private: %{Oidcc.Plug.AuthorizationCallback => {:error, :provider_not_ready}}
472+
private: %{AuthorizationCallback => {:error, :provider_not_ready}}
473473
} =
474474
"get"
475475
|> conn("/", %{"code" => "code"})
@@ -503,7 +503,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
503503
assert %{
504504
halted: false,
505505
private: %{
506-
Oidcc.Plug.AuthorizationCallback => {:ok, {:token, %{"sub" => "sub"}}}
506+
AuthorizationCallback => {:ok, {:token, %{"sub" => "sub"}}}
507507
}
508508
} =
509509
"get"
@@ -577,7 +577,7 @@ defmodule Oidcc.Plug.AuthorizationCallbackTest do
577577
assert %{
578578
halted: false,
579579
private: %{
580-
Oidcc.Plug.AuthorizationCallback => {:ok, {:token, %{"sub" => "sub"}}}
580+
AuthorizationCallback => {:ok, {:token, %{"sub" => "sub"}}}
581581
}
582582
} =
583583
"get"

0 commit comments

Comments
 (0)