Skip to content

Commit

Permalink
rename pkce setter in the builder
Browse files Browse the repository at this point in the history
  • Loading branch information
lbalmaceda committed Jul 29, 2016
1 parent aae75f3 commit f9ac337
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions lib/src/main/java/com/auth0/android/lock/Lock.java
Original file line number Diff line number Diff line change
Expand Up @@ -229,14 +229,14 @@ public Builder useBrowser(boolean useBrowser) {
}

/**
* Whether to use PKCE or the implicit token grant when performing calls to /authenticate.
* Default is {@code true}
* Whether to use implicit grant or code grant when performing calls to /authenticate.
* Default is {@code false}
*
* @param usePKCE if Lock will use PKCE instead of the implicit token grant.
* @param useImplicitGrant if Lock will use implicit grant instead of code grant.
* @return the current Builder instance
*/
public Builder usePKCE(boolean usePKCE) {
options.setUsePKCE(usePKCE);
public Builder useImplicitGrant(boolean useImplicitGrant) {
options.setUsePKCE(!useImplicitGrant);
return this;
}

Expand Down
10 changes: 5 additions & 5 deletions lib/src/main/java/com/auth0/android/lock/PasswordlessLock.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,14 @@ public Builder useBrowser(boolean useBrowser) {
}

/**
* Whether to use PKCE or the implicit token grant when performing calls to /authenticate.
* Default is {@code true}
* Whether to use implicit grant or code grant when performing calls to /authenticate.
* Default is {@code false}
*
* @param usePKCE if Lock will use PKCE instead of the implicit token grant.
* @param useImplicitGrant if Lock will use implicit grant instead of code grant.
* @return the current Builder instance
*/
public Builder usePKCE(boolean usePKCE) {
options.setUsePKCE(usePKCE);
public Builder useImplicitGrant(boolean useImplicitGrant) {
options.setUsePKCE(!useImplicitGrant);
return this;
}

Expand Down

0 comments on commit f9ac337

Please sign in to comment.