Skip to content

Commit c75065b

Browse files
authored
Merge pull request #998 from Ugonnaak1/akaliugonna/deprecateROPC
Deprecate ROPC flow
2 parents d8e92ab + 7c675a3 commit c75065b

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/IPublicClientApplication.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@
1414
public interface IPublicClientApplication extends IClientApplicationBase {
1515

1616
/**
17-
* Acquires tokens from the authority configured in the application via Username/Password authentication.
17+
* Acquires tokens from the authority configured in the application via Username/Password authentication.<br>
18+
* <p><b>Deprecated:</b> This API has been deprecated and will be removed in a future release. Use a more secure flow instead.<br>
19+
* See <a href="https://aka.ms/msal-ropc-migration">https://aka.ms/msal-ropc-migration</a> for migration guidance.
1820
*
1921
* @param parameters instance of {@link UserNamePasswordParameters}
2022
* @return {@link CompletableFuture} containing an {@link IAuthenticationResult}
23+
* @deprecated This API not a secure flow and will be removed in a future release.
2124
*/
25+
@Deprecated
2226
CompletableFuture<IAuthenticationResult> acquireToken(UserNamePasswordParameters parameters);
2327

2428
/**

msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/PublicClientApplication.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public class PublicClientApplication extends AbstractClientApplicationBase imple
2424
private boolean brokerEnabled;
2525

2626
@Override
27+
@Deprecated
2728
public CompletableFuture<IAuthenticationResult> acquireToken(UserNamePasswordParameters parameters) {
2829

2930
validateNotNull("parameters", parameters);

msal4j-sdk/src/main/java/com/microsoft/aad/msal4j/UserNamePasswordParameters.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@
1313
* Object containing parameters for Username/Password flow. Can be used as parameter to
1414
* {@link PublicClientApplication#acquireToken(UserNamePasswordParameters)}
1515
* <p>
16+
* <p><b>Deprecated:</b> This class supports the Resource Owner Password Credentials (ROPC) flow,
17+
* which is insecure and will be removed in a future release.</p>
18+
*
19+
* <p>See <a href="https://aka.ms/msal-ropc-migration">https://aka.ms/msal-ropc-migration</a> for migration guidance.</p>
1620
* For more details, see https://aka.ms/msal4j-username-password
1721
*/
22+
@Deprecated
1823
public class UserNamePasswordParameters implements IAcquireTokenParameters {
1924

2025
private Set<String> scopes;

0 commit comments

Comments
 (0)