Skip to content

Commit

Permalink
Elaborated on metadata, renamed vars for readability.
Browse files Browse the repository at this point in the history
  • Loading branch information
rfc3092 committed Dec 16, 2024
1 parent 4d7400b commit 1ab9b0e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ public class ClientCredentialConfig {
private String azureClientSecret;

@Value("${AZURE_TRYGDEETATEN_APP_CLIENT_ID:#{null}}")
private String trygdeetatenClientId;
private String azureTrygdeetatenClientId;

@Value("${AZURE_TRYGDEETATEN_APP_CLIENT_SECRET:#{null}}")
private String trygdeetatenClientSecret;
private String azureTrygdeetatenClientSecret;

@Value("${AZURE_NAV_APP_CLIENT_ID:#{null}}")
private String proxyClientId;
private String azureNavClientId;

@Value("${AZURE_NAV_APP_CLIENT_SECRET:#{null}}")
private String proxyClientSecret;
private String azureNavClientSecret;

@Bean("azureNavClientCredential")
@Profile("!test")
Expand All @@ -57,9 +57,9 @@ public AzureNavClientCredential azureNavClientCredentialTest() {
public AzureTrygdeetatenClientCredential azureTrygdeetatenClientCredential(
@Value("AZURE_TRYGDEETATEN_OPENID_CONFIG_TOKEN_ENDPOINT") String trygdeetatenTokenEndpoint
) {
Assert.hasLength(trygdeetatenClientId, TRYGDEETATEN_MISSING);
Assert.hasLength(trygdeetatenClientSecret, TRYGDEETATEN_MISSING);
return new AzureTrygdeetatenClientCredential(trygdeetatenTokenEndpoint, trygdeetatenClientId, trygdeetatenClientSecret);
Assert.hasLength(azureTrygdeetatenClientId, TRYGDEETATEN_MISSING);
Assert.hasLength(azureTrygdeetatenClientSecret, TRYGDEETATEN_MISSING);
return new AzureTrygdeetatenClientCredential(trygdeetatenTokenEndpoint, azureTrygdeetatenClientId, azureTrygdeetatenClientSecret);
}

@Bean("azureTrygdeetatenClientCredential")
Expand All @@ -74,11 +74,11 @@ public AzureTrygdeetatenClientCredential azureTrygdeetatenClientCredentialTest()
@ConditionalOnMissingBean(AzureNavProxyClientCredential.class)
@ConditionalOnProperty("AZURE_NAV_OPENID_CONFIG_TOKEN_ENDPOINT")
public AzureNavProxyClientCredential azureNavProxyClientCredential(
@Value("AZURE_NAV_OPENID_CONFIG_TOKEN_ENDPOINT") String proxyTokenEndpoint
@Value("AZURE_NAV_OPENID_CONFIG_TOKEN_ENDPOINT") String azureNavTokenEndpoint
) {
Assert.hasLength(proxyClientId, PROXY_MISSING);
Assert.hasLength(proxyClientSecret, PROXY_MISSING);
return new AzureNavProxyClientCredential(proxyTokenEndpoint, proxyClientId, proxyClientSecret);
Assert.hasLength(azureNavClientId, PROXY_MISSING);
Assert.hasLength(azureNavClientSecret, PROXY_MISSING);
return new AzureNavProxyClientCredential(azureNavTokenEndpoint, azureNavClientId, azureNavClientSecret);
}

@Bean("azureNavProxyClientCredential")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,32 @@
{
"name": "AZURE_TRYGDEETATEN_OPENID_CONFIG_TOKEN_ENDPOINT",
"type": "java.lang.String",
"description": "Satt av NAIS i pod. Hvis satt må også AZURE_TRYGDEETATEN_APP_CLIENT_ID og AZURE_TRYGDEETATEN_APP_CLIENT_SECRET være satt. Se ClientCredentialConfig#azureTrygdeetatenClientCredential."
"description": "Satt av NAIS i pod, fra en secret opprettet av en AzureAdApplication deployment (secretKeyPrefix: \"AZURE_TRYGDEETATEN\"). Hvis satt må også AZURE_TRYGDEETATEN_APP_CLIENT_ID og AZURE_TRYGDEETATEN_APP_CLIENT_SECRET være satt."
},
{
"name": "AZURE_TRYGDEETATEN_APP_CLIENT_ID",
"type": "java.lang.String",
"description": "Satt av NAIS i pod. Se ClientCredentialConfig#azureTrygdeetatenClientCredential."
"description": "Satt av NAIS i pod, fra en secret opprettet av en AzureAdApplication deployment (secretKeyPrefix: \"AZURE_TRYGDEETATEN\")."
},
{
"name": "AZURE_TRYGDEETATEN_APP_CLIENT_SECRET",
"type": "java.lang.String",
"description": "Satt av NAIS i pod. Se ClientCredentialConfig#azureTrygdeetatenClientCredential."
"description": "Satt av NAIS i pod, fra en secret opprettet av en AzureAdApplication deployment (secretKeyPrefix: \"AZURE_TRYGDEETATEN\")."
},
{
"name": "AZURE_NAV_OPENID_CONFIG_TOKEN_ENDPOINT",
"type": "java.lang.String",
"description": "Satt av NAIS i pod. Hvis satt må også AZURE_NAV_APP_CLIENT_ID og AZURE_NAV_APP_CLIENT_SECRET være satt. Se ClientCredentialConfig#azureNavProxyClientCredential."
"description": "Satt av NAIS i pod, fra en secret opprettet av en AzureAdApplication deployment (secretKeyPrefix: \"AZURE_NAV\"). Hvis satt må også AZURE_NAV_APP_CLIENT_ID og AZURE_NAV_APP_CLIENT_SECRET være satt."
},
{
"name": "AZURE_NAV_APP_CLIENT_ID",
"type": "java.lang.String",
"description": "Satt av NAIS i pod. Se ClientCredentialConfig#azureNavProxyClientCredential."
"description": "Satt av NAIS i pod, fra en secret opprettet av en AzureAdApplication deployment (secretKeyPrefix: \"AZURE_NAV\")."
},
{
"name": "AZURE_NAV_APP_CLIENT_SECRET",
"type": "java.lang.String",
"description": "Satt av NAIS i pod. Se ClientCredentialConfig#azureNavProxyClientCredential."
"description": "Satt av NAIS i pod, fra en secret opprettet av en AzureAdApplication deployment (secretKeyPrefix: \"AZURE_NAV\")."
}
]
}

0 comments on commit 1ab9b0e

Please sign in to comment.