format: formated files

This commit is contained in:
carla 2025-06-26 14:00:43 +02:00 committed by carla
parent cc51763a6e
commit c7b13c0ecb
4 changed files with 31 additions and 8 deletions

View file

@ -24,7 +24,8 @@ defmodule Mv.Accounts.User do
token_resource Mv.Accounts.Token token_resource Mv.Accounts.Token
require_token_presence_for_authentication? true require_token_presence_for_authentication? true
store_all_tokens? true store_all_tokens? true
#signing_algorithm "EdDSA" -> https://git.local-it.org/local-it/mitgliederverwaltung/issues/87
# signing_algorithm "EdDSA" -> https://git.local-it.org/local-it/mitgliederverwaltung/issues/87
signing_secret fn _, _ -> signing_secret fn _, _ ->
{:ok, Application.get_env(:mv, :token_signing_secret)} {:ok, Application.get_env(:mv, :token_signing_secret)}
@ -39,7 +40,8 @@ defmodule Mv.Accounts.User do
client_secret Mv.Secrets client_secret Mv.Secrets
auth_method :client_secret_jwt auth_method :client_secret_jwt
code_verifier true code_verifier true
#id_token_signed_response_alg "EdDSA" #-> https://git.local-it.org/local-it/mitgliederverwaltung/issues/87
# id_token_signed_response_alg "EdDSA" #-> https://git.local-it.org/local-it/mitgliederverwaltung/issues/87
end end
password :password do password :password do

View file

@ -1,19 +1,39 @@
defmodule Mv.Secrets do defmodule Mv.Secrets do
use AshAuthentication.Secret use AshAuthentication.Secret
def secret_for([:authentication, :strategies, :rauthy, :client_id], Mv.Accounts.User, _opts, _meth) do def secret_for(
[:authentication, :strategies, :rauthy, :client_id],
Mv.Accounts.User,
_opts,
_meth
) do
get_config(:client_id) get_config(:client_id)
end end
def secret_for([:authentication, :strategies, :rauthy, :redirect_uri], Mv.Accounts.User, _opts, _meth) do def secret_for(
[:authentication, :strategies, :rauthy, :redirect_uri],
Mv.Accounts.User,
_opts,
_meth
) do
get_config(:redirect_uri) get_config(:redirect_uri)
end end
def secret_for([:authentication, :strategies, :rauthy, :client_secret], Mv.Accounts.User, _opts, _meth) do def secret_for(
[:authentication, :strategies, :rauthy, :client_secret],
Mv.Accounts.User,
_opts,
_meth
) do
get_config(:client_secret) get_config(:client_secret)
end end
def secret_for([:authentication, :strategies, :rauthy, :base_url], Mv.Accounts.User, _opts, _meth) do def secret_for(
[:authentication, :strategies, :rauthy, :base_url],
Mv.Accounts.User,
_opts,
_meth
) do
get_config(:base_url) get_config(:base_url)
end end

View file

@ -1,4 +1,5 @@
require Logger require Logger
defmodule MvWeb.AuthController do defmodule MvWeb.AuthController do
use MvWeb, :controller use MvWeb, :controller
use AshAuthentication.Phoenix.Controller use AshAuthentication.Phoenix.Controller
@ -24,6 +25,7 @@ defmodule MvWeb.AuthController do
def failure(conn, activity, reason) do def failure(conn, activity, reason) do
Logger.error(%{conn: conn, reason: reason}) Logger.error(%{conn: conn, reason: reason})
message = message =
case {activity, reason} do case {activity, reason} do
{_, {_,

View file

@ -67,8 +67,7 @@ defmodule MvWeb.Router do
live "/properties/:id", PropertyLive.Show, :show live "/properties/:id", PropertyLive.Show, :show
live "/properties/:id/show/edit", PropertyLive.Show, :edit live "/properties/:id/show/edit", PropertyLive.Show, :edit
post "/set_locale", LocaleController, :set_locale post "/set_locale", LocaleController, :set_locale
end end
# ASHAUTHENTICATION GENERATED AUTH ROUTES # ASHAUTHENTICATION GENERATED AUTH ROUTES