diff --git a/docs/html/images/training/oauth_dance.png b/docs/html/images/training/oauth_dance.png new file mode 100644 index 0000000000000..c519e92427955 Binary files /dev/null and b/docs/html/images/training/oauth_dance.png differ diff --git a/docs/html/training/id-auth/authenticate.jd b/docs/html/training/id-auth/authenticate.jd index 31352e72301af..63897c9765c0c 100644 --- a/docs/html/training/id-auth/authenticate.jd +++ b/docs/html/training/id-auth/authenticate.jd @@ -1,9 +1,9 @@ -page.title=Authenticating to OAuth2 Services -parent.title=Identifying and Authenticating Users +page.title=Authenticating to OAuth2 Services +parent.title=Remembering and Authenticating Users parent.link=index.html trainingnavtop=true -previous.title=Identifying Your User +previous.title=Remembering Your User previous.link=identify.html next.title=Creating a Custom Account Type next.link=custom_auth.html @@ -72,11 +72,10 @@ API.
Now you're ready to request an auth token. Auth tokens usually expire after -some period of time, so you'll have to renew them.
+Now you're ready to request an auth token. This is a multi-step process.
- +
To get an auth token you first need to request the {@link android.Manifest.permission#ACCOUNT_MANAGER} @@ -84,13 +83,13 @@ to yourmanifest file. To actually do anything useful with the token, you'll also need to add the {@link android.Manifest.permission#INTERNET} permission.
-
+
<manifest ... >
<uses-permission android:name="android.permission.ACCOUNT_MANAGER" />
<uses-permission android:name="android.permission.INTERNET" />
...
</manifest>
-
+
Once your app has these permissions set, you can call {@link diff --git a/docs/html/training/id-auth/custom_auth.jd b/docs/html/training/id-auth/custom_auth.jd index 4f59746f51c99..0900d9a964064 100644 --- a/docs/html/training/id-auth/custom_auth.jd +++ b/docs/html/training/id-auth/custom_auth.jd @@ -1,5 +1,5 @@ -page.title=Creating a Custom Account Type -parent.title=Identifying and Authenticating Users +page.title=Creating a Custom Account Type +parent.title=Remembering and Authenticating Users parent.link=index.html trainingnavtop=true @@ -28,8 +28,9 @@ SampleSyncAdapter app -
In the previous lessons, we've talked about using Google accounts to identify Google users and -access Google APIs. But what if you've got your own online service? It turns out +
So far we've talked about accessing Google APIs, which use accounts and users +defined by Google. If you have your own online service, though, it won't have +Google accounts or users, so what do you do? It turns out to be relatively straightforward to install new account types on a user's device. This lesson explains how to create a custom account type that works the same way as the built-in accounts do.
diff --git a/docs/html/training/id-auth/identify.jd b/docs/html/training/id-auth/identify.jd index f18a34fe603f0..a9486280b9c4d 100644 --- a/docs/html/training/id-auth/identify.jd +++ b/docs/html/training/id-auth/identify.jd @@ -1,5 +1,5 @@ -page.title=Identifying Your User -parent.title=Identifying and Authenticating Users +page.title=Remembering Your User +parent.title=Remembering and Authenticating Users parent.link=index.html trainingnavtop=true @@ -17,8 +17,8 @@ next.link=authenticate.htmlFor many applications, the answer is the {@link android.accounts.AccountManager} APIs. With the -user's permission, you can use Account Manager to uniquely identify a user -by the online identity that the user has stored on their device.
+user's permission, you can use Account Manager to fetch the account names +that the user has stored on their device.Integration with the user's accounts allows you to do a variety of things such as:
Applications typically identify the user in three different ways:
+Applications typically try to remember the user using one of three techniques:
Option (c) is the preferred technique. Account Manager allows you to get information about the accounts that are stored on the user's device. As we'll -see in this lesson, using Account Manager lets you identify your user, no matter +see in this lesson, using Account Manager lets you remember your user, no matter how many devices the user may own, by adding just a couple of extra taps to your UI.
@@ -113,7 +113,7 @@ Account[] accounts = am.getAccountsByType("com.google"); the array, you should present a dialog asking the user to select one. -The {@link android.accounts.Account} object contains an account name, which for Google accounts is an @@ -126,12 +126,12 @@ hand.
-Account names are a good way to identify the user, but the {@link android.accounts.Account} +
An account name is a good way to remember the user, but the {@link android.accounts.Account} object by -itself doesn't protect your data or give you access to anything. If you intend -to access private data, you'll need something stronger: authentication. +itself doesn't protect your data or give you access to anything besides the user's account name. If your app +needs to allow the user to go online to access private data, you'll need something stronger: authentication. The next lesson explains how to authenticate to existing online services. The lesson after that deals with writing a custom authenticator so that you can install your own account types.
diff --git a/docs/html/training/id-auth/index.jd b/docs/html/training/id-auth/index.jd index 39ca39728c223..00474ea65b5e9 100644 --- a/docs/html/training/id-auth/index.jd +++ b/docs/html/training/id-auth/index.jd @@ -1,8 +1,8 @@ -page.title=Identifying Users +page.title=Remembering Users trainingnavtop=true startpage=true -next.title=Identifying Your User +next.title=Remembering Your User next.link=identify.html @jd:body @@ -39,7 +39,7 @@ make your application a richer, more personal experience. user's identity, enabling you to: