Skip to content

Commit f0752b3

Browse files
authored
Merge pull request #181 from AzureAD/sagonzal/updateJavaDoc
Update JavaDoc comments
2 parents 32dee12 + 76830d9 commit f0752b3

26 files changed

+106
-14
lines changed

src/main/java/com/microsoft/aad/msal4j/AuthenticationErrorCode.java

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,21 @@
99
public class AuthenticationErrorCode {
1010

1111
/**
12-
* In the context of device code user has not yet authenticated via browser
12+
* In the context of device code user has not yet authenticated via browser. For more details,
13+
* see https://aka.ms/msal4j-device-code
1314
*/
1415
public final static String AUTHORIZATION_PENDING = "authorization_pending";
1516

1617
/**
1718
* In the context of device code, this error happens when the device code has expired before
18-
* the user signed-in on another device (this is usually after 15 min)
19+
* the user signed-in on another device (this is usually after 15 min). For more details, see
20+
* https://aka.ms/msal4j-device-code
1921
*/
2022
public final static String CODE_EXPIRED = "code_expired";
2123

2224
/**
2325
* Standard Oauth2 protocol error code. It indicates that the application needs to expose
24-
* the UI to the user so that user does an interactive action in order to get a new token
26+
* the UI to the user so that user does an interactive action in order to get a new token.
2527
*/
2628
public final static String INVALID_GRANT = "invalid_grant";
2729

@@ -32,7 +34,7 @@ public class AuthenticationErrorCode {
3234

3335
/**
3436
* Password is required for managed user. Will typically happen when trying to do integrated windows authentication
35-
* for managed users
37+
* for managed users. For more information, see https://aka.ms/msal4j-iwa
3638
*/
3739
public final static String PASSWORD_REQUIRED_FOR_MANAGED_USER = "password_required_for_managed_user";
3840

@@ -60,7 +62,7 @@ public class AuthenticationErrorCode {
6062
/**
6163
* The current redirect URI is not a loopback URL. To use the OS browser, a loopback URL must be
6264
* configured both during app registration as well as when initializing the InteractiveRequestParameters
63-
* object
65+
* object. For more details, see https://aka.ms/msal4j-interactive-request
6466
*/
6567
public final static String LOOPBACK_REDIRECT_URI = "loopback_redirect_uri";
6668

@@ -70,19 +72,22 @@ public class AuthenticationErrorCode {
7072
public final static String UNABLE_TO_START_HTTP_LISTENER = "unable_to_start_http_listener";
7173

7274
/**
73-
* Authorization result response is invalid, either because format is invalid or it does not contain
74-
* an authorization code.
75+
* Authorization result response is invalid. Authorization result must contain authorization
76+
* code and state.
7577
*/
7678
public final static String INVALID_AUTHORIZATION_RESULT = "invalid_authorization_result";
7779

7880
/**
7981
* Redirect URI provided to MSAL is of invalid format. Redirect URL must be a loopback URL.
82+
* For more details, see https://aka.ms/msal4j-interactive-request
8083
*/
8184
public final static String INVALID_REDIRECT_URI = "invalid_redirect_uri";
8285

8386
/**
8487
* MSAL was unable to open the user-default browser. This is either because the current platform
85-
* does not support {@link java.awt.Desktop} or {@link java.awt.Desktop.Action#BROWSE}
88+
* does not support {@link java.awt.Desktop} or {@link java.awt.Desktop.Action#BROWSE}. Interactive
89+
* requests require that the client have a system default browser. For more details, see
90+
* https://aka.ms/msal4j-interactive-request
8691
*/
8792
public final static String DESKTOP_BROWSER_NOT_SUPPORTED = "desktop_browser_not_supported";
8893
}

src/main/java/com/microsoft/aad/msal4j/AuthorizationCodeParameters.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,27 @@
2222
@AllArgsConstructor(access = AccessLevel.PRIVATE)
2323
public class AuthorizationCodeParameters {
2424

25+
/**
26+
* Authorization code acquired in the first step of OAuth2.0 authorization code flow. For more
27+
* details, see https://aka.ms/msal4j-authorization-code-flow
28+
*/
2529
@NonNull
2630
private String authorizationCode;
2731

32+
/**
33+
* Redirect URI registered in the Azure portal, and which was used in the first step of OAuth2.0
34+
* authorization code flow. For more details, see https://aka.ms/msal4j-authorization-code-flow
35+
*/
2836
@NonNull
2937
private URI redirectUri;
3038

39+
/**
40+
* Scopes to which the application is requesting access
41+
*/
3142
private Set<String> scopes;
3243

3344
/**
34-
* Code verifier used for PKCE.
45+
* Code verifier used for PKCE. For more details, see https://tools.ietf.org/html/rfc7636
3546
*/
3647
private String codeVerifier;
3748

src/main/java/com/microsoft/aad/msal4j/ClientApplicationBase.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
import static com.microsoft.aad.msal4j.ParameterValidationUtils.validateNotNull;
2323

2424
/**
25-
* Abstract class containing common API methods and properties.
25+
* Abstract class containing common methods and properties to both {@link PublicClientApplication}
26+
* and {@link ConfidentialClientApplication}.
2627
*/
2728
abstract class ClientApplicationBase implements IClientApplicationBase {
2829

src/main/java/com/microsoft/aad/msal4j/ClientCredentialFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
import java.security.cert.X509Certificate;
1111

1212
/**
13-
* Factory for creating client credentials used in confidential client flows
13+
* Factory for creating client credentials used in confidential client flows. For more details, see
14+
* https://aka.ms/msal4j-client-credentials
1415
*/
1516
public class ClientCredentialFactory {
1617

src/main/java/com/microsoft/aad/msal4j/ClientCredentialParameters.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
@AllArgsConstructor(access = AccessLevel.PRIVATE)
2121
public class ClientCredentialParameters {
2222

23+
/**
24+
* Scopes for which the application is requesting access to.
25+
*/
2326
@NonNull
2427
private Set<String> scopes;
2528

src/main/java/com/microsoft/aad/msal4j/ConfidentialClientApplication.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
/**
2323
* Class to be used to acquire tokens for confidential client applications (Web Apps, Web APIs,
2424
* and daemon applications).
25+
* For details see {@link IConfidentialClientApplication}
26+
*
27+
* Conditionally thread-safe
2528
*/
2629
public class ConfidentialClientApplication extends ClientApplicationBase implements IConfidentialClientApplication {
2730

src/main/java/com/microsoft/aad/msal4j/DeviceCodeFlowParameters.java

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,28 @@
1313

1414
/**
1515
* Object containing parameters for device code flow. Can be used as parameter to
16-
* {@link PublicClientApplication#acquireToken(DeviceCodeFlowParameters)}
16+
* {@link PublicClientApplication#acquireToken(DeviceCodeFlowParameters)}. For more details,
17+
* see https://aka.ms/msal4j-device-code
1718
*/
1819
@Builder
1920
@Accessors(fluent = true)
2021
@Getter
2122
@AllArgsConstructor(access = AccessLevel.PRIVATE)
2223
public class DeviceCodeFlowParameters {
2324

25+
/**
26+
* Scopes to which the application is requesting access to.
27+
*/
2428
@NonNull
2529
private Set<String> scopes;
2630

31+
/**
32+
* Receives the device code returned from the first step of Oauth2.0 device code flow. The
33+
* {@link DeviceCode#verificationUri} and the {@link DeviceCode#userCode} should be shown
34+
* to the end user.
35+
*
36+
* For more details, see https://aka.ms/msal4j-device-code
37+
*/
2738
@NonNull
2839
private Consumer<DeviceCode> deviceCodeConsumer;
2940

src/main/java/com/microsoft/aad/msal4j/HttpMethod.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
package com.microsoft.aad.msal4j;
55

66
/**
7-
* Http request method
7+
* Http request method.
88
*/
99
public enum HttpMethod {
1010

src/main/java/com/microsoft/aad/msal4j/IAccount.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
/**
99
* Interface representing a single user account. An IAccount is returned in the {@link IAuthenticationResult}
1010
* property, and is used as parameter in {@link SilentParameters#builder(Set, IAccount)} )}
11+
*
1112
*/
1213
public interface IAccount {
1314

src/main/java/com/microsoft/aad/msal4j/IClientAssertion.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
/**
77
* Credential type containing an assertion of type
88
* "urn:ietf:params:oauth:token-type:jwt".
9+
*
10+
* For more details, see https://aka.ms/msal4j-client-credentials
911
*/
1012
public interface IClientAssertion extends IClientCredential{
1113

0 commit comments

Comments
 (0)