This commit is contained in:
@@ -14,10 +14,10 @@ defmodule PolicyService.Application do
|
||||
PolicyService.Consumers.QuoteTaskConsumer,
|
||||
PolicyService.Consumers.SolicitationTaskConsumer,
|
||||
PolicyService.Projectors.PolicyProjector,
|
||||
PolicyServiceWeb.Telemetry,
|
||||
PolicyService.Repo,
|
||||
{DNSCluster, query: Application.get_env(:policy_service, :dns_cluster_query) || :ignore},
|
||||
{Phoenix.PubSub, name: PolicyService.PubSub, pool_size: 1},
|
||||
PolicyServiceWeb.Telemetry,
|
||||
{Oidcc.ProviderConfiguration.Worker,
|
||||
%{
|
||||
issuer: Application.get_env(:policy_service, :zitadel)[:issuer],
|
||||
|
||||
@@ -15,7 +15,7 @@ defmodule PolicyServiceWeb.Router do
|
||||
plug PolicyServiceWeb.Plugs.RequireOrganizationId
|
||||
plug PolicyServiceWeb.Plugs.ExtractOrganizationId
|
||||
|
||||
plug :introspect
|
||||
plug :validate
|
||||
plug :authorize_roles
|
||||
end
|
||||
|
||||
@@ -46,11 +46,11 @@ defmodule PolicyServiceWeb.Router do
|
||||
get "/", OpenApiSpex.Plug.SwaggerUI, path: "/api/openapi"
|
||||
end
|
||||
|
||||
def introspect(conn, _opts) do
|
||||
def validate(conn, _opts) do
|
||||
zitadel = Application.get_env(:policy_service, :zitadel)
|
||||
|
||||
opts =
|
||||
Oidcc.Plug.IntrospectToken.init(
|
||||
Oidcc.Plug.ValidateJwtToken.init(
|
||||
provider: PolicyService.ZitadelProvider,
|
||||
client_id: zitadel[:client_id],
|
||||
client_secret: zitadel[:client_secret]
|
||||
|
||||
Reference in New Issue
Block a user