diff --git a/docs/html/google/google_toc.cs b/docs/html/google/google_toc.cs index b2051d15074ba..86115346e6bd9 100644 --- a/docs/html/google/google_toc.cs +++ b/docs/html/google/google_toc.cs @@ -23,7 +23,7 @@
  • - Authentication + Authorization
  • diff --git a/docs/html/google/play-services/auth.jd b/docs/html/google/play-services/auth.jd index b1b19e94d4b03..3f46c3fa21a16 100644 --- a/docs/html/google/play-services/auth.jd +++ b/docs/html/google/play-services/auth.jd @@ -1,4 +1,4 @@ -page.title=Authentication +page.title=Authorization @jd:body
    @@ -6,28 +6,28 @@ page.title=Authentication

    In this document

    1. Choosing an Account
    2. -
    3. Obtaining an Authorization Token
    4. +
    5. Obtaining an Access Token
    6. Handling Exceptions
    7. -
    8. Using the Token
    9. +
    10. Using the Access Token

    - Google Play services offers a standard authentication flow for all Google APIs and - all components of Google Play services. In addition, you can leverage the authentication - portion of the Google Play services SDK to authenticate to services that are not yet supported - in the Google Play services platform by using the authentication token to manually make API + Google Play services offers a standard authorization flow for all Google APIs and + all components of Google Play services. In addition, you can leverage the authorization + portion of the Google Play services SDK to gain authorization to services that are not yet supported + in the Google Play services platform by using the access token to manually make API requests or using a client library provided by the service provider.

    -

    For implementation details, see the sample in <android-sdk>/extras/google-play-services/samples/auth, which shows you how -to carry out these basic steps for obtaining an authentication token.

    +

    For implementation details, see the sample in <android-sdk>/extras/google-play-services/samples/auth, +which shows you how to carry out these basic steps for obtaining an acesss token.

    Choosing an Account

    Google Play services leverage existing accounts on an Android-powered device - to authenticate to the services that you want to use. To obtain an authorization token, + to gain authorization to the services that you want to use. To obtain an access token, a valid Google account is required and it must exist on the device. You can ask your users which account they want to use by enumerating the Google accounts on the device or using the built-in @@ -39,7 +39,7 @@ AccountPicker}

    For example, here's how to gather all of the Google accounts on a device and return them - in an array. When obtaining an authorization token, only the email address of the account is + in an array. When obtaining an access token, only the email address of the account is needed, so that is what the array stores:

    @@ -55,24 +55,24 @@ private String[] getAccountNames() { return names; } -

    Obtaining an Authorization Token

    +

    Obtaining an Access Token

    - With an email address, you can now obtain an authorization token. There are two general + With an email address, you can now obtain an access token. There are two general ways to get a token:

    Using getToken()

    - The following code snippet obtains an authentication token with an email address, the scope that you want to use for the service, and a {@link android.content.Context}: + The following code snippet obtains an access token with an email address, the scope that you want to use for the service, and a {@link android.content.Context}:
     HelloActivity mActivity;
     String mEmail;
    @@ -90,13 +90,13 @@ try {
     

    Call this method off of the main UI thread since it executes network transactions. An easy way to do this is in an {@link android.os.AsyncTask}. The sample in the Google Play services SDK shows you how to wrap this call in an AsyncTask. - If authentication is successful, the token is returned. If not, the exceptions described in + If authorization is successful, the token is returned. If not, the exceptions described in Handling Exceptions are thrown that you can catch and handle appropriately.

    Using getTokenWithNotification()

    -

    If you are obtaining authentication tokens in a background service or sync adapter, there +

    If you are obtaining access tokens in a background service or sync adapter, there are three overloaded {@code getTokenWithNotification()} methods @@ -104,11 +104,11 @@ try {