Skip to content

Commit

Permalink
Returning the #basicAuth methods to Client.java
Browse files Browse the repository at this point in the history
Instead, marking them as deprecated and telling apps to use the
accessToken method instead
  • Loading branch information
praecipula committed Aug 13, 2018
1 parent f4d7c73 commit 96e2df3
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/main/java/com/asana/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,29 @@ private String versionHeader() {
return builder.toString().substring(1);
}

/**
* WARNING: API Keys are deprecated and have been removed from Asana's API.
* Prefer using {@link #accessToken(String) accessToken method}.
* @param apiKey Basic Auth API key
* @deprecated
* @return Client instance
*/
public static Client basicAuth(String apiKey) {
return new Client(new BasicAuthDispatcher(apiKey));
}

/**
* WARNING: API Keys are deprecated and have been removed from Asana's API.
* Prefer using {@link #accessToken(String, HttpTransport) accessToken method}.
* @param apiKey Basic Auth API key
* @param httpTransport HttpTransport implementation to use for requests
* @deprecated
* @return Client instance
*/
public static Client basicAuth(String apiKey, HttpTransport httpTransport) {
return new Client(new BasicAuthDispatcher(apiKey, httpTransport));
}

/**
* @param accessToken Personal Access Token
* @return Client instance
Expand Down

0 comments on commit 96e2df3

Please sign in to comment.