Merge lp:~nataliabidart/ubuntu-sso-client/add-api-doc into lp:ubuntu-sso-client
| Status: | Merged |
|---|---|
| Approved by: | dobey on 2010-12-10 |
| Approved revision: | 664 |
| Merged at revision: | 660 |
| Proposed branch: | lp:~nataliabidart/ubuntu-sso-client/add-api-doc |
| Merge into: | lp:ubuntu-sso-client |
| Diff against target: |
218 lines (+213/-1) 1 file modified
README (+213/-1) |
| To merge this branch: | bzr merge lp:~nataliabidart/ubuntu-sso-client/add-api-doc |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| dobey (community) | Approve on 2010-12-10 | ||
| Stuart Langridge (community) | 2010-12-07 | Approve on 2010-12-07 | |
|
Review via email:
|
|||
Commit Message
Documented CredentialsMana
| Natalia Bidart (nataliabidart) wrote : | # |
> Notes:
>
> "They all return information to the caller through signals, since all the
> operations (either against the keyring, or against the SSO webservice) are
> blocking"; possibly append here ", and so the Ubuntu One SSO API is entirely
> asynchronous."
Fixed.
> "NOTE: formerly, the {{{ApplicationC
> under the {{{/credentials}}} obecjt path. That interface is deprecated and
> should not be used." It's deprecated, but does it still work? Do we have a
> plan for removing it in the future? What are the deficits of using it?
Fixed (added "Nevertheless, current applications using this interface will be able to do so until the Ubuntu 11.04 release inclusive, since it won't be removed it until 11.10").
> "Look for credentials on the user's keyring for "app_name". Currently, second
> parameter is not used and an empty dict should be passed." What happens if you
> don't pass the empty dict? If this breaks, then the docs need to say "an empty
> dict MUST be passed".
In dbus, all parameters are mandatory. Fixed.
> What happens if an app calls register or login, U1 pops up the signin/signup
> dialog, and the user kills the dialog or it crashes? (Note: this is not about
> the user cancelling the dialog; that will fire AuthorizationDenied as
> documented.) Is any signal generated in that case? (CredentialsError?)
No signal is sent in this case, since the dbus service can't track this scenario...
> Since it is critically important that two apps do not share the same app_name
> (or they'll get confused over which signals are meant for them), I'd suggest
> calling out in the documentation that app_name must be unique to your app.
Clarification added.
> What happens if a user runs the same app twice? Won't they both have the same
> app_name?
Yeah, and I see no further issue with that... do you?
> '"error_dict" is a dictionary containing at least 2 fields' -- why at least 2?
> What else might be there?
Maybe, in a future. That's why we use dictionaries as parameters, to be able to change the parametes without breaking existent client apps.
> Corrections:
>
> DBus -> D-Bus (numerous places)
All fixed.
> that implements the freedesktop secrets specififcation -> specification
Fixed.
> That object implements the {{{com.
> interface -> CredentialsMana
Fixed.
> the API that ubuntu-sso-client exposes thru -> through
Fixed!
> ubuntu-one-client DBus API -> ubuntuone-client, surely?
ubuntu-sso-client (fixed)
> all of these methods return immediatly -> immediately
>
> {{{/credentials}}} obecjt path -> object
Fixed and fixed.
> If exisitng credentials are not found -> existing
>
> Emitted when the credenntials for "app_name" -> credentials
>
> will be returned to the called through the {{{CredentialsF
> will be returned to the caller
All 3 fixed!
Thanks a lot for this feedback, it was very very good.
- 662. By Natalia Bidart on 2010-12-07
-
Adding corrections from an awesome review.
| dobey (dobey) wrote : | # |
9 +let other applications manage a set of credentials (in a per application basis)
10 +stored in the local keyring.
Should be "let other applications store and manage credentials in the local keyring."
17 +Since release v1.1.5,
Should be "Since version 1.1.5"
31 +interface, that has the methods and signals listed below. One important thing
32 +to note is that all of these methods return immediatley, and return no value.
"One important thing to note" is redundant. Should just be "All of these methods are asynchronous, and return immediately with no value. Signal handlers are required to handle results specially, where necessary." Also, "immediately" is misspelled in the diff (and corrected in my suggested change).
40 +should not be used. Nevertheless, current applications using this interface
"Nevertheless" here should probably be "However" instead.
46 +Any of this methods may emit the {{{CredentialsE
47 +caller's "app_name" as first parameter, and a string-string dict descibing the
48 +error. See below for details about this signal.
"Any of this" should be "Any of these" and "as first parameter" should be "as the first parameter" here. Also "describing" is misspelled as "descibing". I'd suggest perhaps using "dictionary with key and value both as strings" rather than "string-string dict" as well.
Actually, I'm seeing "as {only, parameter, result}" appearing quite often in the text. These should be "as the {only, parameter, result}" in all cases I think. There may be a couple where "a" is appropriate instead of "the," but for the most part, it looks like the should be used.
52 +Look for credentials on the user's keyring for "app_name". Currently, second
53 +parameter is not used and an empty dict must be passed.
There are a couple pretty much exact duplicates of this in the ext. Instead of "second parameter" here, you should use the name of the parameter in quotes. So in this specific case it would be 'Currently, "extra_params" is not used, and should be passed as an empty dict.' (At least, I am only suggesting the use of quotes here as you seem to use quotes for parameter names, when they are used in the methods. So I think we should preserve that style everywhere.)
(I haven't finished reviewing, but I'm going to set this needsfixing now, and continue reviewing as well.)
| Natalia Bidart (nataliabidart) wrote : | # |
> 9 +let other applications manage a set of credentials (in a per
> application basis)
> 10 +stored in the local keyring.
>
> Should be "let other applications store and manage credentials in the local
> keyring."
Changed.
> 17 +Since release v1.1.5,
>
> Should be "Since version 1.1.5"
Changed.
> 31 +interface, that has the methods and signals listed below. One
> important thing
> 32 +to note is that all of these methods return immediately, and return
> no value.
>
> "One important thing to note" is redundant. Should just be "All of these
> methods are asynchronous, and return immediately with no value. Signal
> handlers are required to handle results specially, where necessary." Also,
> "immediately" is misspelled in the diff (and corrected in my suggested
> change).
Suggestion added.
> 40 +should not be used. Nevertheless, current applications using this
> interface
>
> "Nevertheless" here should probably be "However" instead.
Changed.
> 46 +Any of this methods may emit the {{{CredentialsE
> the
> 47 +caller's "app_name" as first parameter, and a string-string dict
> descibing the
> 48 +error. See below for details about this signal.
>
> "Any of this" should be "Any of these" and "as first parameter" should be "as
> the first parameter" here. Also "describing" is misspelled as "descibing". I'd
> suggest perhaps using "dictionary with key and value both as strings" rather
> than "string-string dict" as well.
Changed.
> Actually, I'm seeing "as {only, parameter, result}" appearing quite often in
> the text. These should be "as the {only, parameter, result}" in all cases I
> think. There may be a couple where "a" is appropriate instead of "the," but
> for the most part, it looks like the should be used.
All replaced.
> 52 +Look for credentials on the user's keyring for "app_name". Currently,
> second
> 53 +parameter is not used and an empty dict must be passed.
>
> There are a couple pretty much exact duplicates of this in the ext. Instead of
> "second parameter" here, you should use the name of the parameter in quotes.
> So in this specific case it would be 'Currently, "extra_params" is not used,
> and should be passed as an empty dict.' (At least, I am only suggesting the
> use of quotes here as you seem to use quotes for parameter names, when they
> are used in the methods. So I think we should preserve that style everywhere.)
Good catch, fixed.
> (I haven't finished reviewing, but I'm going to set this needsfixing now, and
> continue reviewing as well.)
Thanks!
- 663. By Natalia Bidart on 2010-12-09
-
More fixes from the review.
- 664. By Natalia Bidart on 2010-12-09
-
Aspell check.

Notes:
"They all return information to the caller through signals, since all the operations (either against the keyring, or against the SSO webservice) are blocking"; possibly append here ", and so the Ubuntu One SSO API is entirely asynchronous."
"NOTE: formerly, the {{{ApplicationC redentials} }} interface was implemented under the {{{/credentials}}} obecjt path. That interface is deprecated and should not be used." It's deprecated, but does it still work? Do we have a plan for removing it in the future? What are the deficits of using it?
"Look for credentials on the user's keyring for "app_name". Currently, second parameter is not used and an empty dict should be passed." What happens if you don't pass the empty dict? If this breaks, then the docs need to say "an empty dict MUST be passed".
What happens if an app calls register or login, U1 pops up the signin/signup dialog, and the user kills the dialog or it crashes? (Note: this is not about the user cancelling the dialog; that will fire AuthorizationDenied as documented.) Is any signal generated in that case? (CredentialsError?)
Since it is critically important that two apps do not share the same app_name (or they'll get confused over which signals are meant for them), I'd suggest calling out in the documentation that app_name must be unique to your app.
What happens if a user runs the same app twice? Won't they both have the same app_name?
'"error_dict" is a dictionary containing at least 2 fields' -- why at least 2? What else might be there?
Corrections:
DBus -> D-Bus (numerous places)
that implements the freedesktop secrets specififcation -> specification
That object implements the {{{com. ubuntu. sso.Credentials Managemenet} }} interface -> CredentialsMana gement
the API that ubuntu-sso-client exposes thru -> through
ubuntu-one-client DBus API -> ubuntuone-client, surely?
all of these methods return immediatly -> immediately
{{{/credentials}}} obecjt path -> object
If exisitng credentials are not found -> existing
Emitted when the credenntials for "app_name" -> credentials
will be returned to the called through the {{{CredentialsF ound}}} signal -> will be returned to the caller