Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JavaDoc errors and warnings #72

Merged
merged 1 commit into from
Jan 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions auth0/src/main/java/com/auth0/android/Auth0.java
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <pre>{@code
* Auth0 auth0 = new Auth0("YOUR_CLIENT_ID", "YOUR_DOMAIN");
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@

/**
* Builder for Auth0 Authentication API parameters
* <p/>
* You can build your parameters like this
* <pre><code>
* Map<String, Object> parameters = ParameterBuilder.newBuilder()
* .setClientId("{CLIENT_ID}")
* .setConnection("{CONNECTION}")
* .set("{PARAMETER_NAME}", "{PARAMETER_VALUE}")
* .asDictionary();
* </code></pre>
* <pre>
* {@code
* Map<String, Object> parameters = ParameterBuilder.newBuilder()
* .setClientId("{CLIENT_ID}")
* .setConnection("{CONNECTION}")
* .set("{PARAMETER_NAME}", "{PARAMETER_VALUE}")
* .asDictionary();
* }
* </pre>
*
* @see ParameterBuilder#newBuilder()
* @see ParameterBuilder#newAuthenticationBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@

/**
* API client for Auth0 Management API.
* <p/>
* <pre><code>
* <pre>
* {@code
* Auth0 auth0 = new Auth0("your_client_id", "your_domain");
* UsersAPIClient client = new UsersAPIClient(auth0);
* </code></pre>
* }
* </pre>
*
* @see <a href="https://auth0.com/docs/api/management/v2">Auth API docs</a>
*/
Expand Down Expand Up @@ -135,7 +136,8 @@ public void setUserAgent(String userAgent) {
/**
* Link a user identity calling <a href="https://auth0.com/docs/link-accounts#the-api">'/api/v2/users/:primaryUserId/identities'</a> endpoint
* Example usage:
* <pre><code>
* <pre>
* {@code
* client.link("{auth0 primary user id}", "{user secondary token}")
* .start(new BaseCallback<List<UserIdentity>>() {
* {@literal}Override
Expand All @@ -144,7 +146,8 @@ public void setUserAgent(String userAgent) {
* {@literal}Override
* public void onFailure(ManagementException error) {}
* });
* </code></pre>
* }
* </pre>
*
* @param primaryUserId of the identity to link
* @param secondaryToken of the secondary identity obtained after login
Expand Down Expand Up @@ -173,7 +176,8 @@ public Request<List<UserIdentity>, ManagementException> link(String primaryUserI
/**
* Unlink a user identity calling <a href="https://auth0.com/docs/link-accounts#unlinking-accounts">'/api/v2/users/:primaryToken/identities/secondaryProvider/secondaryUserId'</a> endpoint
* Example usage:
* <pre><code>
* <pre>
* {@code
* client.unlink("{auth0 primary user id}", {auth0 secondary user id}, "{secondary provider}")
* .start(new BaseCallback<List<UserIdentity>>() {
* {@literal}Override
Expand All @@ -182,7 +186,8 @@ public Request<List<UserIdentity>, ManagementException> link(String primaryUserI
* {@literal}Override
* public void onFailure(ManagementException error) {}
* });
* </code></pre>
* }
* </pre>
*
* @param primaryUserId of the primary identity to unlink
* @param secondaryUserId of the secondary identity you wish to unlink from the main one.
Expand All @@ -209,7 +214,8 @@ public Request<List<UserIdentity>, ManagementException> unlink(String primaryUse
/**
* Update the user_metadata calling <a href="https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id">'/api/v2/users/:token'</a> endpoint
* Example usage:
* <pre><code>
* <pre>
* {@code
* client.updateMetadata("{user id}", "{user metadata}")
* .start(new BaseCallback<UserProfile>() {
* {@literal}Override
Expand All @@ -218,7 +224,8 @@ public Request<List<UserIdentity>, ManagementException> unlink(String primaryUse
* {@literal}Override
* public void onFailure(ManagementException error) {}
* });
* </code></pre>
* }
* </pre>
*
* @param userId of the primary identity to unlink
* @param userMetadata to merge with the existing one
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@
import com.auth0.android.Auth0Exception;

/**
* Interface for a Auth0 request that need Authorization using a JWT
* @param <T>
* Interface for a Auth0 request that need Authorization using a JWT.
*
* @param <T> the type this request will return on success.
* @param <U> the {@link Auth0Exception} type this request will return on failure.
*/
public interface AuthorizableRequest<T, U extends Auth0Exception> extends ParameterizableRequest<T, U> {

/**
* Set the JWT used in 'Authorization' header value
*
* @param jwt token to send to the API
* @return itself
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,23 @@
/**
* Defines a request that can be configured (payload and headers)
*
* @param <T>
* @param <T> the type this request will return on success.
* @param <U> the {@link Auth0Exception} type this request will return on failure.
*/
public interface ParameterizableRequest<T, U extends Auth0Exception> extends Request<T, U> {

/**
* Add parameters to the request as a Map of Object with the keys as String
*
* @param parameters to send with the request
* @return itself
*/
ParameterizableRequest<T, U> addParameters(Map<String, Object> parameters);

/**
* 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
*/
Expand Down
6 changes: 5 additions & 1 deletion auth0/src/main/java/com/auth0/android/request/Request.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,22 @@

/**
* Defines a request that can be started
* @param <T>
*
* @param <T> the type this request will return on success.
* @param <U> the {@link Auth0Exception} type this request will return on failure.
*/
public interface Request<T, U extends Auth0Exception> {

/**
* Performs an async HTTP request against Auth0 API
*
* @param callback called either on success or failure
*/
void start(BaseCallback<T, U> callback);

/**
* Executes the HTTP request against Auth0 API (blocking the current thread)
*
* @return the response on success
* @throws Auth0Exception on failure
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

/**
* The result of a successful delegation to an Auth0 application that contains a new Auth0 'id_token'
* See <a href="https://auth0.com/docs/auth-api#!#post--delegation">delegation</a> docs
* See <a href="https://auth0.com/docs/api/authentication#delegation">delegation</a> docs
*/
public class Delegation {
@SerializedName("id_token")
Expand Down