diff --git a/auth0/src/main/java/com/auth0/android/Auth0.java b/auth0/src/main/java/com/auth0/android/Auth0.java index 3604ca9fb..934018428 100755 --- a/auth0/src/main/java/com/auth0/android/Auth0.java +++ b/auth0/src/main/java/com/auth0/android/Auth0.java @@ -35,7 +35,7 @@ import com.squareup.okhttp.HttpUrl; /** - * Represents your Auth0 account information (clientId & domain), + * Represents your Auth0 account information (clientId {@literal &} domain), * and it's used to obtain clients for Auth0's APIs. *
{@code
  * Auth0 auth0 = new Auth0("YOUR_CLIENT_ID", "YOUR_DOMAIN");
@@ -65,7 +65,7 @@ public Auth0(@NonNull Context context) {
     }
 
     /**
-     * Creates a new object using clientId & domain
+     * Creates a new object using clientId {@literal &} domain
      *
      * @param clientId of your Auth0 application
      * @param domain   of your Auth0 account
@@ -167,13 +167,17 @@ public void setOIDCConformant(boolean enabled) {
 
     /**
      * If the clients works in OIDC conformant mode or not
+     *
+     * @return whether the android client is OIDC conformant or not.
      */
     public boolean isOIDCConformant() {
         return oidcConformant;
     }
 
     /**
-     * @return if every Request, Response and other sensitive information should be logged.
+     * Getter for the HTTP logger is enabled or not.
+     *
+     * @return whether every Request, Response and other sensitive information should be logged or not.
      */
     public boolean isLoggingEnabled() {
         return loggingEnabled;
diff --git a/auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.java b/auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.java
index fa6306716..a79b57524 100755
--- a/auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.java
+++ b/auth0/src/main/java/com/auth0/android/authentication/AuthenticationAPIClient.java
@@ -61,11 +61,12 @@
 
 /**
  * API client for Auth0 Authentication API.
- * 

- *


+ * 
+ * {@code
  * Auth0 auth0 = new Auth0("your_client_id", "your_domain");
  * AuthenticationAPIClient client = new AuthenticationAPIClient(auth0);
- * 
+ * } + *
* * @see Auth API docs */ @@ -159,12 +160,11 @@ public void setUserAgent(String userAgent) { /** * Log in a user with email/username and password for a connection/realm. - *

* In OIDC conformant mode ({@link Auth0#isOIDCConformant()}) it will use the password-realm grant type for the {@code /oauth/token} endpoint * otherwise it will use {@code /oauth/ro} - *

* Example: - *


+     * 
+     * {@code
      * client
      *      .login("{username or email}", "{password}", "{database connection name}")
      *      .start(new BaseCallback() {
@@ -174,7 +174,8 @@ public void setUserAgent(String userAgent) {
      *          {@literal}Override
      *          public void onFailure(AuthenticationException error) { }
      *      });
-     * 
+ * } + *
* * @param usernameOrEmail of the user depending of the type of DB connection * @param password of the user @@ -207,7 +208,8 @@ public AuthenticationRequest login(@NonNull String usernameOrEmail, @NonNull Str /** * Log in a user with email/username and password using the password grant and the default directory * Example usage: - *

+     * 
+     * {@code
      * client.login("{username or email}", "{password}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -216,7 +218,8 @@ public AuthenticationRequest login(@NonNull String usernameOrEmail, @NonNull Str
      *          {@literal}Override
      *          public void onFailure(AuthenticationException error) { }
      *      });
-     * 
+ * } + *
* * @param usernameOrEmail of the user * @param password of the user @@ -234,10 +237,11 @@ public AuthenticationRequest login(@NonNull String usernameOrEmail, @NonNull Str } /** - * Log in a user with a OAuth 'access_token' of a Identity Provider like Facebook or Twitter using '\oauth\access_token' endpoint + * Log in a user with a OAuth 'access_token' of a Identity Provider like Facebook or Twitter using '\oauth\access_token' endpoint * The default scope used is 'openid'. * Example usage: - *

+     * 
+     * {@code
      * client.loginWithOAuthAccessToken("{token}", "{connection name}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -246,7 +250,8 @@ public AuthenticationRequest login(@NonNull String usernameOrEmail, @NonNull Str
      *          {@literal}Override
      *          public void onFailure(AuthenticationException error) { }
      *      });
-     * 
+ * } + *
* * @param token obtained from the IdP * @param connection that will be used to authenticate the user, e.g. 'facebook' @@ -273,7 +278,8 @@ public AuthenticationRequest loginWithOAuthAccessToken(@NonNull String token, @N * Log in a user using a phone number and a verification code received via SMS (Part of passwordless login flow) * The default scope used is 'openid'. * Example usage: - *

+     * 
+     * {@code
      * client.loginWithPhoneNumber("{phone number}", "{code}", "{passwordless connection name}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -282,7 +288,8 @@ public AuthenticationRequest loginWithOAuthAccessToken(@NonNull String token, @N
      *          {@literal}@Override
      *          public void onFailure(AuthenticationException error) { }
      *      });
-     * 
+ * } + *
* * @param phoneNumber where the user received the verification code * @param verificationCode sent by Auth0 via SMS @@ -305,7 +312,8 @@ public AuthenticationRequest loginWithPhoneNumber(@NonNull String phoneNumber, @ * Log in a user using a phone number and a verification code received via SMS (Part of passwordless login flow). * By default it will try to authenticate using the "sms" connection. * Example usage: - *

+     * 
+     * {@code
      * client.loginWithPhoneNumber("{phone number}", "{code}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -314,7 +322,8 @@ public AuthenticationRequest loginWithPhoneNumber(@NonNull String phoneNumber, @
      *          {@literal}@Override
      *          public void onFailure(AuthenticationException error) { }
      *      });
-     * 
+ * } + *
* * @param phoneNumber where the user received the verification code * @param verificationCode sent by Auth0 via SMS @@ -329,7 +338,8 @@ public AuthenticationRequest loginWithPhoneNumber(@NonNull String phoneNumber, @ * Log in a user using an email and a verification code received via Email (Part of passwordless login flow). * The default scope used is 'openid'. * Example usage: - *

+     * 
+     * {@code
      * client.loginWithEmail("{email}", "{code}", "{passwordless connection name}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -338,7 +348,8 @@ public AuthenticationRequest loginWithPhoneNumber(@NonNull String phoneNumber, @
      *          {@literal}@Override
      *          public void onFailure(AuthenticationException error) { }
      *      });
-     * 
+ * } + *
* * @param email where the user received the verification code * @param verificationCode sent by Auth0 via Email @@ -361,7 +372,8 @@ public AuthenticationRequest loginWithEmail(@NonNull String email, @NonNull Stri * Log in a user using an email and a verification code received via Email (Part of passwordless login flow) * By default it will try to authenticate using the "email" connection. * Example usage: - *

+     * 
+     * {@code
      * client.loginWithEmail("{email}", "{code}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -370,7 +382,8 @@ public AuthenticationRequest loginWithEmail(@NonNull String email, @NonNull Stri
      *          {@literal}@Override
      *          public void onFailure(AuthenticationException error) { }
      *      });
-     * 
+ * } + *
* * @param email where the user received the verification code * @param verificationCode sent by Auth0 via Email @@ -384,7 +397,8 @@ public AuthenticationRequest loginWithEmail(@NonNull String email, @NonNull Stri /** * Returns the information of the user associated with the given access_token. * Example usage: - *

+     * 
+     * {@code
      * client.userInfo("{access_token}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -393,7 +407,8 @@ public AuthenticationRequest loginWithEmail(@NonNull String email, @NonNull Stri
      *          {@literal}@Override
      *          public void onFailure(AuthenticationException error) { }
      *      });
-     * 
+ * } + *
* * @param accessToken used to fetch it's information * @return a request to start @@ -406,9 +421,9 @@ public Request userInfo(@NonNull String ac /** * Fetch the token information from Auth0. - *

* Example usage: - *


+     * 
+     * {@code
      * client.tokenInfo("{id_token}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -417,7 +432,8 @@ public Request userInfo(@NonNull String ac
      *          {@literal}@Override
      *          public void onFailure(AuthenticationException error) { }
      *      });
-     * 
+ * } + *
* * @param idToken used to fetch it's information * @return a request to start @@ -435,9 +451,10 @@ public Request tokenInfo(@NonNull String i } /** - * Creates a user in a DB connection using '/dbconnections/signup' endpoint + * Creates a user in a DB connection using '/dbconnections/signup' endpoint * Example usage: - *

+     * 
+     * {@code
      * client.createUser("{email}", "{password}", "{username}", "{database connection name}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -446,7 +463,8 @@ public Request tokenInfo(@NonNull String i
      *          {@literal}@Override
      *          public void onFailure(AuthenticationException error) { }
      *      });
-     * 
+ * } + *
* * @param email of the user and must be non null * @param password of the user and must be non null @@ -475,9 +493,10 @@ public DatabaseConnectionRequest createUs } /** - * Creates a user in a DB connection using '/dbconnections/signup' endpoint + * Creates a user in a DB connection using '/dbconnections/signup' endpoint * Example usage: - *

+     * 
+     * {@code
      * client.createUser("{email}", "{password}", "{database connection name}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -486,7 +505,8 @@ public DatabaseConnectionRequest createUs
      *          {@literal}@Override
      *          public void onFailure(AuthenticationException error) { }
      *      });
-     * 
+ * } + *
* * @param email of the user and must be non null * @param password of the user and must be non null @@ -500,10 +520,11 @@ public DatabaseConnectionRequest createUs } /** - * Creates a user in a DB connection using '/dbconnections/signup' endpoint + * Creates a user in a DB connection using '/dbconnections/signup' endpoint * and then logs in the user. How the user is logged in depends on the {@link Auth0#isOIDCConformant()} flag. * Example usage: - *

+     * 
+     * {@code
      * client.signUp("{email}", "{password}", "{username}", "{database connection name}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -512,7 +533,8 @@ public DatabaseConnectionRequest createUs
      *          {@literal}Override
      *          public void onFailure(AuthenticationException error) {}
      *      });
-     * 
+ * } + *
* * @param email of the user and must be non null * @param password of the user and must be non null @@ -529,10 +551,11 @@ public SignUpRequest signUp(@NonNull String email, @NonNull String password, @No } /** - * Creates a user in a DB connection using '/dbconnections/signup' endpoint + * Creates a user in a DB connection using '/dbconnections/signup' endpoint * and then logs in the user. How the user is logged in depends on the {@link Auth0#isOIDCConformant()} flag. * Example usage: - *

+     * 
+     * {@code
      * client.signUp("{email}", "{password}", "{database connection name}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -541,7 +564,8 @@ public SignUpRequest signUp(@NonNull String email, @NonNull String password, @No
      *          {@literal}Override
      *          public void onFailure(AuthenticationException error) {}
      *      });
-     * 
+ * } + *
* * @param email of the user and must be non null * @param password of the user and must be non null @@ -556,9 +580,10 @@ public SignUpRequest signUp(@NonNull String email, @NonNull String password, @No } /** - * Request a reset password using '/dbconnections/change_password' + * Request a reset password using '/dbconnections/change_password' * Example usage: - *

+     * 
+     * {@code
      * client.resetPassword("{email}", "{database connection name}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -567,7 +592,8 @@ public SignUpRequest signUp(@NonNull String email, @NonNull String password, @No
      *          {@literal}Override
      *          public void onFailure(AuthenticationException error) {}
      *      });
-     * 
+ * } + *
* * @param email of the user to request the password reset. An email will be sent with the reset instructions. * @param connection of the database to request the reset password on @@ -595,9 +621,9 @@ public DatabaseConnectionRequest resetPassword(@N * Requests new Credentials using a valid Refresh Token. The received token will have the same audience and scope as first requested. How the new Credentials are requested depends on the {@link Auth0#isOIDCConformant()} flag. * - If the instance is OIDC Conformant the endpoint will be /oauth/token with 'refresh_token' grant, and the response will include an id_token and an access_token if 'openid' scope was requested when the refresh_token was obtained. * - If the instance is not OIDC Conformant the endpoint will be /delegation with 'urn:ietf:params:oauth:grant-type:jwt-bearer' grant, and the response will include an id_token. - *

* Example usage: - *


+     * 
+     * {@code
      * client.renewAuth("{refresh_token}")
      *      .addParameter("scope", "openid profile email")
      *      .start(new BaseCallback() {
@@ -607,7 +633,8 @@ public DatabaseConnectionRequest resetPassword(@N
      *          {@literal}@Override
      *          public void onFailure(AuthenticationException error) { }
      *      });
-     * 
+ * } + *
* * @param refreshToken used to fetch the new Credentials. * @return a request to start @@ -637,9 +664,10 @@ public ParameterizableRequest renewAuth(@N } /** - * Performs a delegation request that will yield a new Auth0 'id_token' + * Performs a delegation request that will yield a new Auth0 'id_token' * Example usage: - *

+     * 
+     * {@code
      * client.delegationWithIdToken("{id token}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -648,7 +676,8 @@ public ParameterizableRequest renewAuth(@N
      *          {@literal}Override
      *          public void onFailure(AuthenticationException error) {}
      *      });
-     * 
+ * } + *
* * @param idToken issued by Auth0 for the user. The token must not be expired. * @return a request to configure and start @@ -663,10 +692,11 @@ public DelegationRequest delegationWithIdToken(@NonNull String idTok } /** - * Performs a delegation request that will yield a new Auth0 'id_token'. + * Performs a delegation request that will yield a new Auth0 'id_token'. * Check our refresh token docs for more information * Example usage: - *

+     * 
+     * {@code
      * client.delegationWithRefreshToken("{refresh token}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -675,7 +705,8 @@ public DelegationRequest delegationWithIdToken(@NonNull String idTok
      *          {@literal}Override
      *          public void onFailure(AuthenticationException error) {}
      *      });
-     * 
+ * } + *
* * @param refreshToken issued by Auth0 for the user when using the 'offline_access' scope when logging in. * @return a request to configure and start @@ -690,9 +721,10 @@ public DelegationRequest delegationWithRefreshToken(@NonNull String } /** - * Performs a delegation request that will yield a delegation token. + * Performs a delegation request that will yield a delegation token. * Example usage: - *

+     * 
+     * {@code
      * client.delegationWithIdToken("{id token}", "{app type, e.g. firebase}")
      *      .start(new BaseCallback>() {
      *          {@literal}Override
@@ -701,7 +733,8 @@ public DelegationRequest delegationWithRefreshToken(@NonNull String
      *          {@literal}Override
      *          public void onFailure(AuthenticationException error) {}
      *      });
-     * 
+ * } + *
* * @param idToken issued by Auth0 for the user. The token must not be expired. * @param apiType the delegation 'api_type' parameter @@ -717,9 +750,10 @@ public DelegationRequest> delegationWithIdToken(@NonNull Str } /** - * Start a passwordless flow with Email + * Start a passwordless flow with an Email * Example usage: - *

+     * 
+     * {@code
      * client.passwordlessWithEmail("{email}", PasswordlessType.CODE, "{passwordless connection name}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -728,10 +762,12 @@ public DelegationRequest> delegationWithIdToken(@NonNull Str
      *          {@literal}Override
      *          public void onFailure(AuthenticationException error) {}
      *      });
-     * 
+ * } + *
* * @param email that will receive a verification code to use for login - * @param passwordlessType indicate whether the email should contain a code, link or magic link (android & iOS) + * @param passwordlessType indicate whether the email should contain a code, link or magic link (android {@literal &} iOS) + * @param connection the passwordless connection to start the flow with. * @return a request to configure and start */ @SuppressWarnings("WeakerAccess") @@ -747,10 +783,11 @@ public ParameterizableRequest passwordlessWithEma } /** - * Start a passwordless flow with Email + * Start a passwordless flow with an Email * By default it will try to authenticate using "email" connection. * Example usage: - *

+     * 
+     * {@code
      * client.passwordlessWithEmail("{email}", PasswordlessType.CODE)
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -759,10 +796,11 @@ public ParameterizableRequest passwordlessWithEma
      *          {@literal}Override
      *          public void onFailure(AuthenticationException error) {}
      *      });
-     * 
+ * } + *
* * @param email that will receive a verification code to use for login - * @param passwordlessType indicate whether the email should contain a code, link or magic link (android & iOS) + * @param passwordlessType indicate whether the email should contain a code, link or magic link (android {@literal &} iOS) * @return a request to configure and start */ @SuppressWarnings("WeakerAccess") @@ -771,9 +809,10 @@ public ParameterizableRequest passwordlessWithEma } /** - * Start a passwordless flow with SMS + * Start a passwordless flow with a SMS * Example usage: - *

+     * 
+     * {@code
      * client.passwordlessWithSms("{phone number}", PasswordlessType.CODE, "{passwordless connection name}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -782,10 +821,12 @@ public ParameterizableRequest passwordlessWithEma
      *          {@literal}Override
      *          public void onFailure(AuthenticationException error) {}
      *      });
-     * 
+ * } + *
* * @param phoneNumber where an SMS with a verification code will be sent - * @param passwordlessType indicate whether the SMS should contain a code, link or magic link (android & iOS) + * @param passwordlessType indicate whether the SMS should contain a code, link or magic link (android {@literal &} iOS) + * @param connection the passwordless connection to start the flow with. * @return a request to configure and start */ @SuppressWarnings("WeakerAccess") @@ -800,10 +841,11 @@ public ParameterizableRequest passwordlessWithSMS } /** - * Start a passwordless flow with SMS + * Start a passwordless flow with a SMS * By default it will try to authenticate using the "sms" connection. * Example usage: - *

+     * 
+     * {@code
      * client.passwordlessWithSms("{phone number}", PasswordlessType.CODE)
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -812,10 +854,11 @@ public ParameterizableRequest passwordlessWithSMS
      *          {@literal}Override
      *          public void onFailure(AuthenticationException error) {}
      *      });
-     * 
+ * } + *
* * @param phoneNumber where an SMS with a verification code will be sent - * @param passwordlessType indicate whether the SMS should contain a code, link or magic link (android & iOS) + * @param passwordlessType indicate whether the SMS should contain a code, link or magic link (android {@literal &} iOS) * @return a request to configure and start */ @SuppressWarnings("WeakerAccess") @@ -824,10 +867,11 @@ public ParameterizableRequest passwordlessWithSMS } /** - * Performs a custom delegation request that will + * Performs a custom delegation request that will * yield a delegation token. * Example usage: - *

+     * 
+     * {@code
      * client.delegation()
      *      .addParameter("api_type", "firebase")
      *      .start(new BaseCallback>() {
@@ -837,7 +881,8 @@ public ParameterizableRequest passwordlessWithSMS
      *          {@literal}Override
      *          public void onFailure(AuthenticationException error) {}
      *      });
-     * 
+ * } + *
* * @return a request to configure and start */ @@ -904,26 +949,26 @@ public ProfileRequest getProfileAfter(@NonNull AuthenticationRequest authenticat /** * Fetch the token information from Auth0, using the authorization_code grant type - *

* For Public Client, e.g. Android apps ,you need to provide the code_verifier * used to generate the challenge sent to Auth0 {@literal /authorize} method like: - *

- *

{@code
+     * 
+     * {@code
      * AuthenticationAPIClient client = new AuthenticationAPIClient(new Auth0("clientId", "domain"));
      * client
      *     .token("code", "redirect_uri")
      *     .setCodeVerifier("code_verifier")
      *     .start(new Callback {...});
-     * }
- *

+ * } + *

* For the rest of clients, clients who can safely keep a {@literal client_secret}, you need to provide it instead like: - *

- *

{@code
+     * 
+     * {@code
      * AuthenticationAPIClient client = new AuthenticationAPIClient(new Auth0("clientId", "domain"));
      * client
      *     .token("code", "redirect_uri")
      *     .start(new Callback {...});
-     * }
+ * } + *
* * @param authorizationCode the authorization code received from the /authorize call. * @param redirectUri the uri sent to /authorize as the 'redirect_uri'. diff --git a/auth0/src/main/java/com/auth0/android/authentication/ParameterBuilder.java b/auth0/src/main/java/com/auth0/android/authentication/ParameterBuilder.java index 29827558e..feb265adc 100755 --- a/auth0/src/main/java/com/auth0/android/authentication/ParameterBuilder.java +++ b/auth0/src/main/java/com/auth0/android/authentication/ParameterBuilder.java @@ -32,15 +32,16 @@ /** * Builder for Auth0 Authentication API parameters - *

* You can build your parameters like this - *


- *     Map parameters = ParameterBuilder.newBuilder()
- *                                                      .setClientId("{CLIENT_ID}")
- *                                                      .setConnection("{CONNECTION}")
- *                                                      .set("{PARAMETER_NAME}", "{PARAMETER_VALUE}")
- *                                                      .asDictionary();
- * 
+ *
+ * {@code
+ * Map parameters = ParameterBuilder.newBuilder()
+ *      .setClientId("{CLIENT_ID}")
+ *      .setConnection("{CONNECTION}")
+ *      .set("{PARAMETER_NAME}", "{PARAMETER_VALUE}")
+ *      .asDictionary();
+ * }
+ * 
* * @see ParameterBuilder#newBuilder() * @see ParameterBuilder#newAuthenticationBuilder() diff --git a/auth0/src/main/java/com/auth0/android/management/UsersAPIClient.java b/auth0/src/main/java/com/auth0/android/management/UsersAPIClient.java index 0f860ea51..517bc9674 100755 --- a/auth0/src/main/java/com/auth0/android/management/UsersAPIClient.java +++ b/auth0/src/main/java/com/auth0/android/management/UsersAPIClient.java @@ -49,11 +49,12 @@ /** * API client for Auth0 Management API. - *

- *


+ * 
+ * {@code
  * Auth0 auth0 = new Auth0("your_client_id", "your_domain");
  * UsersAPIClient client = new UsersAPIClient(auth0);
- * 
+ * } + *
* * @see Auth API docs */ @@ -135,7 +136,8 @@ public void setUserAgent(String userAgent) { /** * Link a user identity calling '/api/v2/users/:primaryUserId/identities' endpoint * Example usage: - *

+     * 
+     * {@code
      * client.link("{auth0 primary user id}", "{user secondary token}")
      *      .start(new BaseCallback>() {
      *          {@literal}Override
@@ -144,7 +146,8 @@ public void setUserAgent(String userAgent) {
      *          {@literal}Override
      *          public void onFailure(ManagementException error) {}
      *      });
-     * 
+ * } + *
* * @param primaryUserId of the identity to link * @param secondaryToken of the secondary identity obtained after login @@ -173,7 +176,8 @@ public Request, ManagementException> link(String primaryUserI /** * Unlink a user identity calling '/api/v2/users/:primaryToken/identities/secondaryProvider/secondaryUserId' endpoint * Example usage: - *

+     * 
+     * {@code
      * client.unlink("{auth0 primary user id}", {auth0 secondary user id}, "{secondary provider}")
      *      .start(new BaseCallback>() {
      *          {@literal}Override
@@ -182,7 +186,8 @@ public Request, ManagementException> link(String primaryUserI
      *          {@literal}Override
      *          public void onFailure(ManagementException error) {}
      *      });
-     * 
+ * } + *
* * @param primaryUserId of the primary identity to unlink * @param secondaryUserId of the secondary identity you wish to unlink from the main one. @@ -209,7 +214,8 @@ public Request, ManagementException> unlink(String primaryUse /** * Update the user_metadata calling '/api/v2/users/:token' endpoint * Example usage: - *

+     * 
+     * {@code
      * client.updateMetadata("{user id}", "{user metadata}")
      *      .start(new BaseCallback() {
      *          {@literal}Override
@@ -218,7 +224,8 @@ public Request, ManagementException> unlink(String primaryUse
      *          {@literal}Override
      *          public void onFailure(ManagementException error) {}
      *      });
-     * 
+ * } + *
* * @param userId of the primary identity to unlink * @param userMetadata to merge with the existing one diff --git a/auth0/src/main/java/com/auth0/android/request/AuthorizableRequest.java b/auth0/src/main/java/com/auth0/android/request/AuthorizableRequest.java index d764742a5..2acafe676 100755 --- a/auth0/src/main/java/com/auth0/android/request/AuthorizableRequest.java +++ b/auth0/src/main/java/com/auth0/android/request/AuthorizableRequest.java @@ -27,13 +27,16 @@ import com.auth0.android.Auth0Exception; /** - * Interface for a Auth0 request that need Authorization using a JWT - * @param + * Interface for a Auth0 request that need Authorization using a JWT. + * + * @param the type this request will return on success. + * @param the {@link Auth0Exception} type this request will return on failure. */ public interface AuthorizableRequest extends ParameterizableRequest { /** * Set the JWT used in 'Authorization' header value + * * @param jwt token to send to the API * @return itself */ diff --git a/auth0/src/main/java/com/auth0/android/request/ParameterizableRequest.java b/auth0/src/main/java/com/auth0/android/request/ParameterizableRequest.java index 7a031bbd2..049443d6a 100755 --- a/auth0/src/main/java/com/auth0/android/request/ParameterizableRequest.java +++ b/auth0/src/main/java/com/auth0/android/request/ParameterizableRequest.java @@ -31,12 +31,14 @@ /** * Defines a request that can be configured (payload and headers) * - * @param + * @param the type this request will return on success. + * @param the {@link Auth0Exception} type this request will return on failure. */ public interface ParameterizableRequest extends Request { /** * Add parameters to the request as a Map of Object with the keys as String + * * @param parameters to send with the request * @return itself */ @@ -44,7 +46,8 @@ public interface ParameterizableRequest extends Req /** * Add parameter to the request with a given name - * @param name of the parameter + * + * @param name of the parameter * @param value of the parameter * @return itself */ diff --git a/auth0/src/main/java/com/auth0/android/request/Request.java b/auth0/src/main/java/com/auth0/android/request/Request.java index bb75d63ac..940590b9d 100755 --- a/auth0/src/main/java/com/auth0/android/request/Request.java +++ b/auth0/src/main/java/com/auth0/android/request/Request.java @@ -29,18 +29,22 @@ /** * Defines a request that can be started - * @param + * + * @param the type this request will return on success. + * @param the {@link Auth0Exception} type this request will return on failure. */ public interface Request { /** * Performs an async HTTP request against Auth0 API + * * @param callback called either on success or failure */ void start(BaseCallback callback); /** * Executes the HTTP request against Auth0 API (blocking the current thread) + * * @return the response on success * @throws Auth0Exception on failure */ diff --git a/auth0/src/main/java/com/auth0/android/result/Delegation.java b/auth0/src/main/java/com/auth0/android/result/Delegation.java index 63c9d0e83..5f0c6e0f3 100755 --- a/auth0/src/main/java/com/auth0/android/result/Delegation.java +++ b/auth0/src/main/java/com/auth0/android/result/Delegation.java @@ -31,7 +31,7 @@ /** * The result of a successful delegation to an Auth0 application that contains a new Auth0 'id_token' - * See delegation docs + * See delegation docs */ public class Delegation { @SerializedName("id_token")