Skip to content

Commit

Permalink
Fix Zitadel Audiences (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
maennchen authored Oct 20, 2024
1 parent 2dc5917 commit 2f059fb
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lib/oidcc.ex
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ defmodule Oidcc do
...> Oidcc.jwt_profile_token(
...> subject,
...> pid,
...> System.fetch_env!("CLIENT_ID"),
...> "JWT Profile Test",
...> "client_secret",
...> jwk,
...> %{scope: ["openid", "urn:zitadel:iam:org:project:id:zitadel:aud"], kid: kid}
Expand Down
2 changes: 1 addition & 1 deletion lib/oidcc/token.ex
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ defmodule Oidcc.Token do
...> {:ok, client_context} =
...> Oidcc.ClientContext.from_configuration_worker(
...> pid,
...> System.fetch_env!("CLIENT_ID"),
...> "JWT Profile Test",
...> "client_secret"
...> )
...>
Expand Down
3 changes: 1 addition & 2 deletions test/oidcc/token_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ defmodule Oidcc.TokenTest do

setup_all do
# Used in doctests
System.put_env("CLIENT_ID", @project)
System.put_env("CLIENT_CREDENTIALS_CLIENT_ID", @client_credentials_client_id)
System.put_env("CLIENT_CREDENTIALS_CLIENT_SECRET", @client_credentials_client_secret)
System.put_env("JWT_PROFILE", @jwt_profile)
Expand Down Expand Up @@ -191,7 +190,7 @@ defmodule Oidcc.TokenTest do
{:ok, client_context} =
ClientContext.from_configuration_worker(
pid,
@project,
"JWT Profile Test",
"client_secret"
)

Expand Down
2 changes: 1 addition & 1 deletion test/oidcc_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ retrieve_jwt_profile_token(_Config) ->
oidcc:jwt_profile_token(
<<"231391584430604723">>,
ZitadelConfigurationPid,
<<"231391584430604723">>,
<<"JWT Profile Test">>,
<<"client_secret">>,
Key,
#{
Expand Down
3 changes: 1 addition & 2 deletions test/oidcc_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ defmodule OidccTest do

setup_all do
# Used in doctests
System.put_env("CLIENT_ID", @project)
System.put_env("CLIENT_CREDENTIALS_CLIENT_ID", @client_credentials_client_id)
System.put_env("CLIENT_CREDENTIALS_CLIENT_SECRET", @client_credentials_client_secret)
System.put_env("JWT_PROFILE", @jwt_profile)
Expand Down Expand Up @@ -165,7 +164,7 @@ defmodule OidccTest do
Oidcc.jwt_profile_token(
subject,
pid,
@project,
"JWT Profile Test",
"client_secret",
jwk,
%{scope: ["openid", "urn:zitadel:iam:org:project:id:zitadel:aud"], kid: kid}
Expand Down
2 changes: 1 addition & 1 deletion test/oidcc_token_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ retrieves_jwt_profile_token(_Config) ->

{ok, ZitadelClientContext} = oidcc_client_context:from_configuration_worker(
ZitadelConfigurationPid,
<<"231391584430604723">>,
<<"JWT Profile Test">>,
<<"client_secret">>
),

Expand Down

0 comments on commit 2f059fb

Please sign in to comment.