Skip to content

Commit

Permalink
Merge pull request #103 from auth0/oidc-flag-doc
Browse files Browse the repository at this point in the history
Add OIDC flag documentation
  • Loading branch information
lbalmaceda authored Jul 6, 2017
2 parents 1554b04 + 682194b commit ce2b839
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,19 @@ And then create a new Auth0 instance by passing an Android Context:
Auth0 account = new Auth0(context);
```

## OIDC Conformant Mode

It is strongly encouraged that this SDK be used in OIDC Conformant mode. When this mode is enabled, it will force the SDK to use Auth0's current authentication pipeline and will prevent it from reaching legacy endpoints. By default is `false`

```java
Auth0 account = new Auth0("{YOUR_CLIENT_ID}", "{YOUR_DOMAIN}");
//Configure the account in OIDC conformant mode
account.setOIDCConformant(true);
//Use the account in the API clients
```

Passwordless authentication *cannot be used* with this flag set to `true`. For more information, please see the [OIDC adoption guide](https://auth0.com/docs/api-auth/tutorials/adoption).


### Authentication API

Expand Down Expand Up @@ -91,7 +104,7 @@ authentication
#### Passwordless Login

This feature requires your client to have the *Resource Owner* Legacy Grant Type enabled. Check [this article](https://auth0.com/docs/clients/client-grant-types) to learn how to enable it.
This feature requires your client to have the *Resource Owner* Legacy Grant Type enabled. Check [this article](https://auth0.com/docs/clients/client-grant-types) to learn how to enable it. Note that Passwordless authentication *cannot be used* with the [OIDC Conformant Mode](#oidc-conformant-mode) enabled.

Passwordless it's a 2 steps flow:

Expand Down
17 changes: 14 additions & 3 deletions auth0/src/main/java/com/auth0/android/Auth0.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@
* <pre>{@code
* Auth0 auth0 = new Auth0("YOUR_CLIENT_ID", "YOUR_DOMAIN");
* }</pre>
* It is strongly encouraged that this SDK be used in OIDC Conformant mode.
* When this mode is enabled, it will force the SDK to use Auth0's current authentication pipeline
* and will prevent it from reaching legacy endpoints. By default is `false`
* <pre>{@code
* auth0.setOIDCConformant(true);
* }</pre>
* For more information, please see the <a href="https://auth0.com/docs/api-auth/tutorials/adoption">OIDC adoption guide</a>.
*
* @see Auth0#setOIDCConformant(boolean)
*/
public class Auth0 {

Expand Down Expand Up @@ -148,9 +157,11 @@ public void doNotSendTelemetry() {
}

/**
* Defines if the client uses OIDC conformant authentication endpoints. By default is {@code false}
* It is strongly encouraged that this SDK be used in OIDC Conformant mode.
* When this mode is enabled, it will force the SDK to use Auth0's current authentication pipeline
* and will prevent it from reaching legacy endpoints. By default is {@code false}
* For more information, please see the <a href="https://auth0.com/docs/api-auth/tutorials/adoption">OIDC adoption guide</a>.
* <p>
* You will need to enable this setting in the Auth0 Dashboard first: Go to Account (top right), Account Settings, click Advanced and check the toggle at the bottom.
* This setting affects how authentication is performed in the following methods:
* <ul>
* <li>{@link AuthenticationAPIClient#login(String, String, String)}</li>
Expand All @@ -159,7 +170,7 @@ public void doNotSendTelemetry() {
* <li>{@link AuthenticationAPIClient#renewAuth(String)}</li>
* </ul>
*
* @param enabled if Lock will use the Legacy Auth API or the new OIDC Conformant Auth API.
* @param enabled if Lock will use the Legacy Authentication API or the new OIDC Conformant Authentication API.
*/
public void setOIDCConformant(boolean enabled) {
this.oidcConformant = enabled;
Expand Down

0 comments on commit ce2b839

Please sign in to comment.