2013-09-25 41 views
0

我已經在我的UAA(CloudFoundry V2)創建的客戶端:CloudFoundry UAA不接受HTTP基本驗證

$ uaac client add clienttest --scope testscope --secret mysecret --authorized_grant_types client_credentials 
    scope: testscope 
    client_id: clienttest 
    authorized_grant_types: client_credentials 
    id: clienttest 

當我後來嘗試,並獲得令牌爲我的客戶(根據戴維Syer的例子)我得到302重定向到一個登錄表單:

$ curl "http://clienttest:[email protected]" -d grant_type=client_credentials -d client_id=clienttest -v 
* About to connect() to uaa.domain.com port 80 (#0) 
* Trying 31.210.241.5... 
* connected 
* Connected to uaa.domain.com (31.210.241.5) port 80 (#0) 
* Server auth using Basic with user 'clienttest' 
> POST/HTTP/1.1 
> Authorization: Basic ZGpvbmVzdGVzdDpteXNlY3JldA== 
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8x zlib/1.2.5 
> Host: uaa.domain.com 
> Accept: */* 
> Content-Length: 50 
> Content-Type: application/x-www-form-urlencoded 
> 
* upload completely sent off: 50 out of 50 bytes 
< HTTP/1.1 302 Found 
< Content-Length: 0 
< Date: Wed, 25 Sep 2013 13:49:23 GMT 
< Location: http://uaa.domain.com/login;jsessionid=D97804429EF745FBDF02F0F6DA278C66 
< Server: Apache-Coyote/1.1 
< Set-Cookie: JSESSIONID=D97804429EF745FBDF02F0F6DA278C66; Path=/; HttpOnly 
< 
* Connection #0 to host uaa.domain.com left intact 
* Closing connection #0 

這裏是我的客戶端的狀態:

$ uaac client get clienttest 
    scope: testscope 
    client_id: clienttest 
    resource_ids: none 
    authorized_grant_types: client_credentials 
    authorities: uaa.none 

我也三編輯這與我們的admin用戶和我得到相同的302.

我可以成功使用uaac token client get clienttest獲得令牌。

任何想法我做錯了什麼?

回答