Skip to content

Commit

Permalink
update exception message for device code flow
Browse files Browse the repository at this point in the history
  • Loading branch information
siddhijain committed Apr 13, 2023
1 parent 56ec57d commit 9d4e1dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -68,7 +68,7 @@ public CompletableFuture<IAuthenticationResult> acquireToken(DeviceCodeFlowParam

if (AuthorityType.B2C.equals(authenticationAuthority.authorityType())) {
throw new IllegalArgumentException(
"Invalid authority type. Device Flow is only supported by AAD, ADFS and CIAM authorities");
"Invalid authority type. Device Flow is not supported by B2C authority.");
}

validateNotNull("parameters", parameters);
Expand Down
Expand Up @@ -145,7 +145,7 @@ public void deviceCodeFlowTest() throws Exception {
}

@Test(expectedExceptions = IllegalArgumentException.class,
expectedExceptionsMessageRegExp = "Invalid authority type. Device Flow is only supported by AAD, ADFS and CIAM authorities")
expectedExceptionsMessageRegExp = "Invalid authority type. Device Flow is not supported by B2C authority.")
public void executeAcquireDeviceCode_B2CAuthorityUsed_IllegalArgumentExceptionThrown()
throws Exception {

Expand Down

0 comments on commit 9d4e1dd

Please sign in to comment.