Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Zitadel Audiences #381

Merged
merged 1 commit into from
Oct 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -31,7 +31,7 @@

@client_credentials_client_id client_credentials_client_id
@client_credentials_client_secret client_credentials_client_secret
@project project

Check warning on line 34 in test/oidcc/token_test.exs

View workflow job for this annotation

GitHub Actions / Test / mix test (1.14.5)

module attribute @project was set but never used

Check warning on line 34 in test/oidcc/token_test.exs

View workflow job for this annotation

GitHub Actions / Test / mix test (1.15.8)

module attribute @project was set but never used

@jwt_profile :oidcc
|> Application.app_dir("priv/test/fixtures/zitadel-jwt-profile.json")
Expand All @@ -41,7 +41,6 @@

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 @@
{: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 @@ -18,7 +18,7 @@

@client_credentials_client_id client_credentials_client_id
@client_credentials_client_secret client_credentials_client_secret
@project project

Check warning on line 21 in test/oidcc_test.exs

View workflow job for this annotation

GitHub Actions / Test / mix test (1.14.5)

module attribute @project was set but never used

Check warning on line 21 in test/oidcc_test.exs

View workflow job for this annotation

GitHub Actions / Test / mix test (1.15.8)

module attribute @project was set but never used

@jwt_profile :oidcc
|> Application.app_dir("priv/test/fixtures/zitadel-jwt-profile.json")
Expand All @@ -28,7 +28,6 @@

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 @@
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
Loading