Skip to content

Commit

Permalink
chore: corrected the exception msg
Browse files Browse the repository at this point in the history
  • Loading branch information
sbansla committed Sep 30, 2024
1 parent cba6839 commit 6ab9442
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ public class ClientCredentialProvider extends CredentialProvider {
public ClientCredentialProvider(String clientId, String clientSecret) {
super(EnumConstants.AuthType.CLIENT_CREDENTIALS);
if (clientId == null || clientSecret == null) {
// TODO: Test with invalid credentials
throw new AuthenticationException("Invalid credentials passed");
throw new AuthenticationException("ClientId or ClientSecret can not be null");
}
this.grantType = "client_credentials";
this.clientId = clientId;
Expand All @@ -33,10 +32,8 @@ public ClientCredentialProvider(String clientId, String clientSecret) {

public ClientCredentialProvider(String clientId, String clientSecret, TokenManager tokenManager) {
super(EnumConstants.AuthType.CLIENT_CREDENTIALS);
// TODO: Null check
if (clientId == null || clientSecret == null || tokenManager == null) {
// TODO: Test with invalid credentials
throw new AuthenticationException("Invalid credentials passed");
throw new AuthenticationException("ClientId or ClientSecret or TokenManager can not be null");
}
this.grantType = "client_credentials";
this.clientId = clientId;
Expand Down

0 comments on commit 6ab9442

Please sign in to comment.