format: formated files
This commit is contained in:
parent
cc51763a6e
commit
c7b13c0ecb
4 changed files with 31 additions and 8 deletions
|
|
@ -24,6 +24,7 @@ defmodule Mv.Accounts.User do
|
|||
token_resource Mv.Accounts.Token
|
||||
require_token_presence_for_authentication? true
|
||||
store_all_tokens? true
|
||||
|
||||
# signing_algorithm "EdDSA" -> https://git.local-it.org/local-it/mitgliederverwaltung/issues/87
|
||||
|
||||
signing_secret fn _, _ ->
|
||||
|
|
@ -39,6 +40,7 @@ defmodule Mv.Accounts.User do
|
|||
client_secret Mv.Secrets
|
||||
auth_method :client_secret_jwt
|
||||
code_verifier true
|
||||
|
||||
# id_token_signed_response_alg "EdDSA" #-> https://git.local-it.org/local-it/mitgliederverwaltung/issues/87
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,19 +1,39 @@
|
|||
defmodule Mv.Secrets do
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
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)
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
require Logger
|
||||
|
||||
defmodule MvWeb.AuthController do
|
||||
use MvWeb, :controller
|
||||
use AshAuthentication.Phoenix.Controller
|
||||
|
|
@ -24,6 +25,7 @@ defmodule MvWeb.AuthController do
|
|||
|
||||
def failure(conn, activity, reason) do
|
||||
Logger.error(%{conn: conn, reason: reason})
|
||||
|
||||
message =
|
||||
case {activity, reason} do
|
||||
{_,
|
||||
|
|
|
|||
|
|
@ -68,7 +68,6 @@ defmodule MvWeb.Router do
|
|||
live "/properties/:id/show/edit", PropertyLive.Show, :edit
|
||||
|
||||
post "/set_locale", LocaleController, :set_locale
|
||||
|
||||
end
|
||||
|
||||
# ASHAUTHENTICATION GENERATED AUTH ROUTES
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue