Hi Magnus,
Without making any changes to the constructor I just changed the url in
4 files as shown by the diffs below. It then just works providing you
have the LWP::Protocol::https module.
---
/home/jarrod/rpmbuild/SOURCES/WWW-Google-Contacts-0.35/lib/WWW/Google/Contacts/ContactList.pm
2012-08-03 14:25:55.000000000 +0100
+++ /usr/share/perl5/vendor_perl/WWW/Google/Contacts/ContactList.pm
2013-03-19 17:35:37.000000000 +0000
@@ -10,7 +10,7 @@
with 'WWW::Google::Contacts::Roles::List';
-sub baseurl { '
http://www.google.com/m8/feeds/contacts/default' }
+sub baseurl { '
https://www.google.com/m8/feeds/contacts/default' }
sub element_class { 'WWW::Google::Contacts::Contact' }
no Moose;
---
/home/jarrod/rpmbuild/SOURCES/WWW-Google-Contacts-0.35/lib/WWW/Google/Contacts/Group.pm
2012-08-03 14:25:55.000000000 +0100
+++ /usr/share/perl5/vendor_perl/WWW/Google/Contacts/Group.pm 2013-03-19
17:35:37.000000000 +0000
@@ -11,7 +11,7 @@
use WWW::Google::Contacts::Meta::Attribute::Trait::XmlField;
-sub create_url { '
http://www.google.com/m8/feeds/groups/default/full' }
+sub create_url { '
https://www.google.com/m8/feeds/groups/default/full' }
extends 'WWW::Google::Contacts::Base';
---
/home/jarrod/rpmbuild/SOURCES/WWW-Google-Contacts-0.35/lib/WWW/Google/Contacts/Contact.pm
2012-08-03 14:25:55.000000000 +0100
+++ /usr/share/perl5/vendor_perl/WWW/Google/Contacts/Contact.pm
2013-03-19 17:35:37.000000000 +0000
@@ -32,7 +32,7 @@
use WWW::Google::Contacts::Meta::Attribute::Trait::XmlField;
use Carp;
-sub create_url { '
http://www.google.com/m8/feeds/contacts/default/full' }
+sub create_url { '
https://www.google.com/m8/feeds/contacts/default/full' }
extends 'WWW::Google::Contacts::Base';
---
/home/jarrod/rpmbuild/SOURCES/WWW-Google-Contacts-0.35/lib/WWW/Google/Contacts/GroupList.pm
2012-08-03 14:25:55.000000000 +0100
+++ /usr/share/perl5/vendor_perl/WWW/Google/Contacts/GroupList.pm
2013-03-19 17:35:37.000000000 +0000
@@ -10,7 +10,7 @@
with 'WWW::Google::Contacts::Roles::List';
-sub baseurl { '
http://www.google.com/m8/feeds/groups/default' }
+sub baseurl { '
https://www.google.com/m8/feeds/groups/default' }
sub element_class { 'WWW::Google::Contacts::Group' }
no Moose;
I hope this works for you.
Jarrod
On 19/03/13 22:58, Magnus Erixzon via RT wrote:
Show quoted text> <URL:
https://rt.cpan.org/Ticket/Display.html?id=84037 >
>
> Hi Jarrod
>
> I'm happy to hear you're finding use of this module.
>
> This is indeed a very good idea. It should really all be over https..
> I'll try to get around to sorting this out some time soon.
>
> If you have already written code for this, perhaps you could send me a diff of your updates?
>
> cheers
> Magnus
>
>
>
> On Mon Mar 18 21:30:00 2013, jarrod@makin.co wrote:
>> Good day.
>>
>> I have recently written a useful script making use of this module,
>> though not without some tweaks.
>>
>> May I suggest changing 'http://' for 'https://' in the following four
>> files?
>>
>> WWW/Google/Contacts/Contact.pm
>> WWW/Google/Contacts/ContactList.pm
>> WWW/Google/Contacts/Group.pm
>> WWW/Google/Contacts/GroupList.pm
>>
>> People with google apps accounts can choose to " Enforce SSL"
>> "Automatically enforce Secure Socket Layer (SSL) connections for any
>> application calling the Contacts API, Google Apps Profiles API, or
>> Domain Shared Contacts API. When checked, non-SSL connections will be
>> closed with an HTTP Unauthorized status (401)"
>>
>> By making this change, it ensures that module is more compatible with
>> more people's accounts, as well as improving overall security.
>> Another method of implementation, would be something like:
>>
>> my $google = WWW::Google::Contacts->new( username=>
>> "your.username", password=> "your.password", method => "https" );
>>
>>
>