Skip to content

Commit

Permalink
- Improved error message on missing config.
Browse files Browse the repository at this point in the history
  • Loading branch information
rfc3092 committed Dec 11, 2024
1 parent 9d5d25a commit 64cc974
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@
@Getter
public class ClientCredential {

private static final String MISSING_CONFIG_MESSAGE = "AZURE_NAV_APP_CLIENT_ID and AZURE_NAV_APP_CLIENT_SECRET must be set";

private final String clientId;
private final String clientSecret;

public ClientCredential(String clientId, String clientSecret) {
Assert.notNull(clientId, "AZURE_NAV_APP_CLIENT_ID must be set");
Assert.notNull(clientSecret, "AZURE_NAV_APP_CLIENT_SECRET must be set");
Assert.noNullElements(new String[]{clientId, clientSecret}, MISSING_CONFIG_MESSAGE);

this.clientId = clientId;
this.clientSecret = clientSecret;
Expand Down

0 comments on commit 64cc974

Please sign in to comment.