anchor.diff:      </tr>
       <tr>
         <td><code>oauth.login</code></td>
  -      <td>This scope is used to indicate a login application, such as external login servers, can perform trusted operations, such as creating users not authenticated in the UAA.</td>
  +      <td>This scope is used to indicate a login app, such as external login servers, can perform trusted operations, such as creating users not authenticated in the UAA.</td>
       </tr>
       <tr>
         <td><code>approvals.me</code></td>
  
positive.code:     url: http://uaa.vcap.example.net/login.do
  ```
  
  There is also an environment variable (or Java System property), `LOGIN_SECRET`, for the client secret that the app uses when it authenticates itself with the UAA.
  The login app is registered by default in the UAA only if there are no active Spring profiles.
  In the UAA, the registration is located in the `oauth-clients.xml` config file:
  
  
negative.code:     }
      </pre>
  
  3. Run `gem install cf-uaac` to install the Cloud Foundry UAA Command Line Client (UAAC) Ruby gem.
  
      <pre class="terminal">
      $ gem install cf-uaac
      </pre>
  
  3. Run `uaac target http://localhost:8080/uaa` to target the local UAA Server endpoint.
  
      <pre class="terminal">
      $ uaac target http://localhost:8080/uaa
   </pre>
  
  3. Run `uaac token get USERNAME PASSWORD` to log in. Replace `USERNAME` with your user name, and `PASSWORD` with your password. For example:
  
      <pre class="terminal">
      $ uaac token get marissa koala
      </pre>
  
      If you do not specify a username and password, the UAAC prompts you to 
      supply them.
      <br><br>
      The `uaac token client get` command authenticates and obtains an access 
      token from the server using the OAuth2 implicit grant, similar to the 
      approach intended for a standalone client like the Cloud Foundry Command 
      Line Interface (cf CLI). 
      <br><br>
      UAAC stores the access token in the `~/.uaac.yml` file. Open the 
      `~/.uaac.yml` in a text editor and copy this access token to use in the 
      next step.
  
  4. Run `uaac token decode ACCESS-TOKEN-VALUE` to retrieve the token details. Replace `ACCESS-TOKEN-VALUE` with your access token, copied from your `~/.uaac.yml` file. The UAAC should display your username and the client id of the original token grant. For example:
  
      <pre class="terminal">
      $ uaac token decode abcdef0123456789ABCDEF0123456789ghijklmnopqr01234567890
      jti: e3a7d065-8514-43c2-b1f8-f8ab761791e2
      sub: f796d1a2-eca3-4079-a317-f3224f8f7832
      scope: scim.userids password.write openid cloud_controller.write cloud_controller.read
      client_id: cf
      cid: cf
      user_id: f796d1a2-eca3-4079-a317-f3224f8f7832
      user_name: marissa
      email: marissa@example.org
      iat: 1413495264
      exp: 1413538464
      iss: http://localhost:8080/uaa/oauth/token
      aud: scim openid cloud_controller password
      </pre>
  
  ### <a id='cf'></a>Deploy UAA to Cloud Foundry ###
  
  Follow the instructions below to build the UAA as an app and push it to Cloud Foundry using the Cloud Foundry Command Line Interface (cf CLI). 
  
  1. In a terminal window, clone the UAA GitHub repository. 
  
      <pre class="terminal">
      $ git clone git://github.com/cloudfoundry/uaa.git
      </pre>
  
  2. Navigate to the directory where you cloned the UAA GitHub repository, then run the `./gradlew :cloudfoundry-identity-uaa:war` command build the UAA as a WAR file. 
  
      <pre class="terminal">
      $ cd uaa
      $ ./gradlew :cloudfoundry-identity-uaa:war
      </pre>
  
  3. Run the cf CLI `cf push APP-NAME -m 512M -p PATH-TO-WAR-FILE --no-start` command to push the app to Cloud Foundry. Replace `APP-NAME` with a name for your UAA app, and `PATH-TO-WAR-FILE` with the path to the WAR file you created in the previous step. For example:
  
      <pre class="terminal">
      $ cf push MYUAA -m 512M -p uaa/build/libs/cloudfoundry-identity-uaa-1.8.0.war --no-start
      </pre>
  
  4. Run `cf set-env APP-NAME SPRING_PROFILES_ACTIVE default` to set the `SPRING_PROFILES_ACTIVE` environment variable with the value `default`. Replace `APP-NAME` with the name of your app that you used in the previous step. For example:
  
      <pre class="terminal">
      $ cf set-env MYUAA SPRING_PROFILES_ACTIVE default
      </pre>
  
  5. Run `cf start APP-NAME` to start your app. Replace `APP-NAME` with the name of your app. For example:
  
      <pre class="terminal">
      $ cf start MYUAA
      </pre>
  
  ### <a id='demo-hosted'></a>Use Remote UAA ###
  
  You use a UAA server that you pushed as an app to Cloud Foundry in a similar way to one you [run locally](#demo-local). You do not need app token encoding because you do not have the client secret.
  
  Follow the steps below to access and use a UAA server that you pushed as an app to Cloud Foundry.
  
  
  1. [Deploy UAA to Cloud Foundry](#) as described above. 
  
  1. From the project base directory, run `curl -H "Accept: application/json" APP-FQDN/login` to query the external login endpoint about the system. Replace `APP-FQDN` with the FQDN of your app. For example:
  
      <pre class="terminal">
      $ curl -H "Accept: application/json" uaa.example.org/login
      {
        "timestamp":"2014-09-15T18:25:04+0000",
        "app":{"version":"1.8.3"},
        "commit_id":"git-metadata-not-found",
        "prompts":{"username":["text","Email"],
            "password":["password","Password"]
        }
      }
      </pre>
  
  1. Run `gem install cf-uaac` to install the Cloud Foundry UAA Command Line Client (UAAC) Ruby gem.
  
      <pre class="terminal">
      $ gem install cf-uaac
      </pre>
  
  3. Run `uaac target APP-FQDN` to target the remote UAA Server endpoint. Replace `APP-FQDN` with the FQDN of your app.
      <pre class="terminal">
      $ uaac target uaa.example.org
      </pre>
  
  3. Run `uaac token get USERNAME PASSWORD` to log in. Replace `USERNAME` with your user name, and `PASSWORD` with your password. For example:
  
      <pre class="terminal">
      $ uaac token get marissa koala
      </pre>
  
      If you do not specify a username and password, the UAAC prompts you to 
      supply them.
      <br><br>
      The `uaac token client get` command authenticates and obtains an access 
      token from the server using the OAuth2 implicit grant, similar to the 
      approach intended for a standalone client like the Cloud Foundry Command 
      Line Interface (cf CLI). 
  
  ## <a id='integration'></a>Integration Tests ##
  
  