| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This separates authentication and authorisation from the services themselves,
allowing authorisation schemes to be plugged in as they pop into and out of
fashion.
This removes the old gdata_service_authenticate() methods, replacing
them with an equivalent GDataClientLoginAuthorizer.
Full test cases are provided, covering everything except parsing of error
responses from the server by GDataClientLoginAuthorizer.
This makes the following API changes:
• Rename GDataAuthenticationError to GDataClientLoginAuthorizerError
Rename GDATA_AUTHENTICATION_ERROR and gdata_authentication_error_quark()
similarly.
• Remove gdata_service_authenticate() in favour of
using GDataClientLoginAuthorizer with GDataService::authorizer:
- Remove gdata_service_authenticate(),
gdata_service_authenticate_async() and
gdata_service_authenticate_finish().
- Replace gdata_service_is_authenticated() by
gdata_service_is_authorized() with much the same functionality.
- Add GDataService::authorizer, gdata_service_get_authorizer(),
gdata_service_set_authorizer() and
gdata_service_get_authorization_domains().
- Remove gdata_service_get_client_id() in favour of
GDataClientLoginAuthorizer::client-id.
- Remove gdata_service_get_username() in favour of
GDataClientLoginAuthorizer::username.
- Remove gdata_service_get_password() in favour of
GDataClientLoginAuthorizer::password.
- Remove GDataServiceClass->service_name in favour of
GDataAuthorizationDomain::service-name.
- Remove GDataServiceClass->authentication_uri and
GDataServiceClass->parse_authentication_response in favour of
different GDataAuthorizer implementations.
- Add GDataAuthorizer parameters to and remove client_id parameters from:
gdata_calendar_service_new(), gdata_contacts_service_new(),
gdata_documents_service_new(), gdata_picasaweb_service_new() and
gdata_youtube_service_new().
• Add GDataAuthorizationDomain.
- Add GDataServiceClass->get_authorization_domains and
gdata_service_get_authorization_domains().
- Add auth. domain getters to various GDataService subclasses:
gdata_youtube_service_get_primary_authorization_domain(),
gdata_contacts_service_get_primary_authorization_domain(),
gdata_calendar_service_get_primary_authorization_domain(),
gdata_picasaweb_service_get_primary_authorization_domain(),
gdata_documents_service_get_primary_authorization_domain() and
gdata_documents_service_get_spreadsheet_authorization_domain().
- Add auth. domain properties to various standalone request objects:
GDataDownloadStream::authorization-domain with
gdata_download_stream_get_authorization_domain(),
GDataUploadStream::authorization-domain with
gdata_upload_stream_get_authorization_domain() and
GDataBatchOperation::authorization-domain with
gdata_batch_operation_get_authorization_domain().
- Add GDataAccessHandlerIface->get_authorization_domain. This doesn't
have to be implemented by existing GDataAccessHandlers, but it's
highly recommended.
- Add a GDataAuthorizationDomain parameter to
GDataServiceClass->append_query_headers,
gdata_service_query(), gdata_service_query_async(),
gdata_service_query_single_entry(),
gdata_service_query_single_entry_async(), gdata_service_insert_entry(),
gdata_service_insert_entry_async(), gdata_service_update_entry(),
gdata_service_update_entry_async(), gdata_service_delete_entry(),
gdata_service_delete_entry_async(),
gdata_batchable_create_operation(),
gdata_download_stream_new() and gdata_upload_stream_new().
• Add GDataAuthorizer as described above, implemented by
GDataClientLoginAuthorizer.
Helps: bgo#646285
|