On 08/05/2013 02:24 PM, Kanavin, Alexander wrote:
> It is possible to have many "method/mechanism" entries
> "auth" section of .provider and .service files. So, if your oauth2
> plugin needs different parameters than ours, you can simply call
> it differently (like, "goauth2").
If it is possible, I don't see how:
ag_account_service_get_auth_data() returns a single instance of
AuthData, and AuthData has a single method for fetching the method
and a single method for fetching the mechanism. Accordingly, the xml
format doesn't seem to allow such setup either:
<?xml version="1.0" encoding="UTF-8" ?> <provider
<name>Google</name> <_description>Includes Gmail, Google Docs,
Google+, YouTube and Picasa</_description> <icon>google</icon>
<template> <group name="auth"> <setting
Can you explain?
You can have many methods, but only one will be used:
<!-- The two lines above select the actual method/mechanism to be used -->
...and more methods...
As you can see, you can have many groups defined, but you also need to
tell which one will be used (or you can omit that information in the
.service file, if you store it directly in the accounts DB).
> If we cannot eliminate the differences between UOA and Tizen,
> recommend that EDS treats them as different entities, and
> therefore installs different .service files depending on the
> parameters passed to the ./configure script. Then,
> ag_account_service_get_auth_data() will return the correct values.
I think Patrick would like to have fully run-time detection of
available SSO-specific auth settings and SSO backends. We can of
course try to eliminate the differences in oauth plugins' API, but
then we also need to commit to maintaining the compatibility.
I don't think it would be too hard. We just have to discuss any upcoming
changes on the mailing list, before implementing them.
On the other hand, it may be that for some reason we might *want* EDS to
behave differently, for example for deciding which scopes to request and
when, so for that case we might need to have different .service files