test(AshAuthentication): updated tests for signed in user and added test for authcontroller

This commit is contained in:
carla 2025-07-02 11:32:48 +02:00 committed by carla
parent c7b13c0ecb
commit fba9abc2c1
8 changed files with 116 additions and 2 deletions

View file

@ -95,3 +95,8 @@ config :mv, :rauthy,
base_url: "http://localhost:8080/auth/v1",
client_secret: System.get_env("OIDC_CLIENT_SECRET"),
redirect_uri: "http://localhost:4000/auth/user/rauthy/callback"
# AshAuthentication development configuration
config :mv, :session_identifier, nil
config :mv, :require_token_presence_for_authentication, true

View file

@ -55,6 +55,11 @@ if config_env() == :prod do
config :mv, :rauthy, redirect_uri: "http://localhost:4000/auth/user/rauthy/callback"
# AshAuthentication production configuration
config :mv, :session_identifier, nil
config :mv, :require_token_presence_for_authentication, true
config :mv, MvWeb.Endpoint,
url: [host: host, port: 443, scheme: "https"],
http: [

View file

@ -36,3 +36,12 @@ config :phoenix, :plug_init_mode, :runtime
# Enable helpful, but potentially expensive runtime checks
config :phoenix_live_view,
enable_expensive_runtime_checks: true
# Token signing secret for AshAuthentication tests
config :mv, :token_signing_secret, "test_secret_key_for_ash_authentication_tokens"
# AshAuthentication test-specific configuration
# In Tests we don't need token presence, but in other envs its recommended
config :mv, :session_identifier, :unsafe
config :mv, :require_token_presence_for_authentication, false