Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Jiang committed Feb 7, 2017
1 parent b53d32c commit 0eb44de
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 25 deletions.
22 changes: 1 addition & 21 deletions sdk/src/main/java/com/stormpath/sdk/ApiManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,27 +118,7 @@ void register(RegistrationForm registrationForm, StormpathCallback<Void> callbac
okHttpClient.newCall(request).enqueue(new OkHttpCallback<Void>(callback) {
@Override
protected void onSuccess(Response response, StormpathCallback<Void> callback) {
try {
// TODO: what the hell, how do we know if registration is successful or not?
// Does this code just always return success if the API call goes through?
String sessionTokens[] = {"PLACEHOLDER"};
String accessToken = sessionTokens[0];
String refreshToken = sessionTokens[1];

if (StringUtils.isNotBlank(accessToken)) {
preferenceStore.setAccessToken(accessToken);

if (StringUtils.isNotBlank(refreshToken)) {
preferenceStore.setRefreshToken(refreshToken);
}
} else {
Stormpath.logger().i("There was no access_token in the register cookies, if you want to skip the login after "
+ "registration, enable the autologin in your Stormpath server app.");
}
successCallback(null);
} catch (Throwable t) {
failureCallback(t);
}
successCallback(null);
}
});
}
Expand Down
1 change: 0 additions & 1 deletion sdk/src/main/java/com/stormpath/sdk/CustomTabActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.app.Activity;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

/**
* Created by edjiang on 1/5/17.
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/main/java/com/stormpath/sdk/Stormpath.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static void loginWithAccountStore(String href, Activity activity, Stormpa
}

/**
* Refreshes the access token and stores the new value which you can access via {@link Stormpath#accessToken()}. By default it uses
* Refreshes the access token and stores the new value which you can access via {@link Stormpath#getAccessToken()}. By default it uses
* path /oauth/token which can be overridden via {@link StormpathConfiguration}.
*/
public static void refreshAccessToken(StormpathCallback<Void> callback) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static class Builder {
String apiUrl;

/**
* @param the URL of your API, eg. "https://stormpath-notes.apps.stormpath.io/".
* @param baseUrl the URL of your API, eg. "https://stormpath-notes.apps.stormpath.io/".
*/
public Builder baseUrl(String baseUrl) {
this.apiUrl = baseUrl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ public void bindCustomTabsService(Activity activity) {
}

/**
* @see {@link CustomTabsSession#mayLaunchUrl(Uri, Bundle, List)}.
* @return true if call to mayLaunchUrl was accepted.
*/
public boolean mayLaunchUrl(Uri uri, Bundle extras, List<Bundle> otherLikelyBundles) {
Expand Down

0 comments on commit 0eb44de

Please sign in to comment.