Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

clarified documentation and explained how to run gem against cloud fo…

…undry.com

Minor corrections to spelling and command specification. Added a short
section explaining how to run the UAA gem against cloudfoundry.com.
Added example output from decode command...

Change-Id: Ibb400ab8002feb51699558afe4db0320a71737db
  • Loading branch information...
commit 73e67fa0bc4eb94c5ae172e5f25320b3b883facf 1 parent e2e261b
Andy Piper andypiper authored

Showing 1 changed file with 43 additions and 9 deletions. Show diff stats Hide diff stats

  1. +43 9 README.md
52 README.md
Source Rendered
@@ -28,12 +28,12 @@ from the command line (or run integration tests).
28 28
29 29 ### Demo of command line usage
30 30
31   -First run the uaa server as described above:
  31 +First run the UAA server as described above:
32 32
33 33 $ cd uaa
34 34 $ mvn tomcat:run
35 35
36   -Then start another terminal and from the project base directory, and ask
  36 +Then start another terminal and from the project base directory, ask
37 37 the login endpoint to tell you about the system:
38 38
39 39 $ curl -H "Accept: application/json" localhost:8080/uaa/login
@@ -48,9 +48,9 @@ the login endpoint to tell you about the system:
48 48 Then you can try logging in with the UAA ruby gem. Make sure you have
49 49 ruby 1.9, and bundler installed, then
50 50
51   - $ (cd gem/; bundle)
52   - $ ./gem/bin/uaa target localhost:8080/uaa
53   - $ ./gem/bin/uaa login marissa koala
  51 + $ cd gem/; bundle
  52 + $ ./bin/uaa target localhost:8080/uaa
  53 + $ ./bin/uaa login marissa koala
54 54
55 55 (or leave out the username / password to be prompted).
56 56
@@ -59,10 +59,44 @@ the OAuth2 implicit grant, similar to the approach intended for a
59 59 client like VMC. The token is returned in stdout, so copy paste the
60 60 value into this next command:
61 61
62   - $ ./gem/bin/uaa --client-id=admin --client-secret=adminclientsecret decode
  62 + $ ./bin/uaa --client-id=admin --client-secret=adminclientsecret decode [token]
63 63
64   -and you should see your username and the client id of the original
65   -token grant on stdout.
  64 +and you should see your username and the client id of the original token grant on stdout.
  65 +
  66 + {
  67 + "id":"17a99e38-c5fd-46a3-9d37-6b12db0937c9",
  68 + "resource_ids":["cloud_controller","password"],
  69 + "expires_at":1334117495,
  70 + "scope":["read"],
  71 + "email":"marissa@test.org",
  72 + "client_authorities":["ROLE_UNTRUSTED"],
  73 + "expires_in":43171,
  74 + "user_authorities":["ROLE_USER"],
  75 + "user_id":"marissa",
  76 + "client_id":"vmc"
  77 + }
  78 +
  79 +### Demo of command line usage against e.g. cloudfoundry.com
  80 +
  81 +The same command line example should work against a UAA running on cloudfoundry.com. In this case, there is no need to run a local uaa server, so simply ask the external login endpoint to tell you about the system:
  82 +
  83 + $ curl -H "Accept: application/json" uaa.cloudfoundry.com/login
  84 + {
  85 + "prompts":{"username":["text","Username"],
  86 + "password":["password","Password"]
  87 + }
  88 + }
  89 +
  90 +You can then try logging in with the UAA ruby gem. Make sure you have ruby 1.9, and bundler installed, then
  91 +
  92 + $ cd gem/; bundle
  93 + $ ./bin/uaa target uaa.cloudfoundry.com
  94 + $ ./bin/uaa login [yourusername] [yourpassword]
  95 +
  96 +(or leave out the username / password to be prompted).
  97 +
  98 +This authenticates and obtains an access token from the server using the OAuth2 implicit
  99 +grant, similar to the approach intended for a client like VMC.
66 100
67 101 ## Integration tests
68 102
@@ -228,7 +262,7 @@ In CloudFoundry terms
228 262 The authentication service is `uaa`. It's a plain Spring MVC webapp.
229 263 Deploy as normal in Tomcat or your container of choice, or execute
230 264 `mvn tomcat:run` to run it directly from `uaa` directory in the source tree.
231   -When running with maven it listen on port 8080.
  265 +When running with maven it listens on port 8080.
232 266
233 267 It supports the APIs defined in the UAA-APIs document. To summarise:
234 268

Git Notes

review

Code-Review+2: Dave Syer <dsyer@vmware.com>
Verified+1: CI Master <cf-ci@rbcon.com>
Submitted-by: Dave Syer <dsyer@vmware.com>
Submitted-at: Mon, 23 Apr 2012 12:25:58 +0000
Reviewed-on: http://reviews.cloudfoundry.org/5149
Project: uaa
Branch: refs/heads/master

0 comments on commit 73e67fa

Please sign in to comment.
Something went wrong with that request. Please try again.