Merge lp:~vds/usso/kind_of_login into lp:usso
Proposed by
Vincenzo Di Somma
Status: | Merged |
---|---|
Approved by: | Casey Marshall |
Approved revision: | 30 |
Merged at revision: | 30 |
Proposed branch: | lp:~vds/usso/kind_of_login |
Merge into: | lp:usso |
Diff against target: |
125 lines (+67/-5) 3 files modified
example/usso_example.go (+2/-3) usso.go (+36/-1) usso_test.go (+29/-1) |
To merge this branch: | bzr merge lp:~vds/usso/kind_of_login |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Casey Marshall (community) | Approve | ||
Review via email: mp+193462@code.launchpad.net |
Commit message
Adding support for getting token details.
Description of the change
Adding support for getting token details.
To post a comment you must log in.
I updated my usso_test app to evaluate the contents of the token details, and it seems to work well with the following test.
Using https:/ /bazaar. launchpad. net/~cmars/ +junk/usso_ test/view/ head:/main. go, I signed into usso, authorizing the test application token, "test-usso-token". The resulting auth string was valid when checked against USSO, token details were thus:
{ 31T19:28: 50.268" , tokens/ oauth/[ redacted, same as token_key's value]", 31T19:28: 50.268" ,
"token_name": "test-usso-token",
"date_updated": "2013-10-
"token_key": "[redacted]",
"href": "/api/v2/
"date_created": "2013-10-
"consumer_key": "[redacted]"
}
Then I went to the Applications tab on login.ubuntu.com and test-usso-token was listed as an authorized application. I deleted the authorization there, and a subsequent USSO query with the auth string came back with token details:
{"message": "Provided email/password is not correct.", "code": "INVALID_ CREDENTIALS" , "extra": {}}
This looks very good to me!