# admin logins.
%info = (
- 'svc' => 'svc_acct',
- 'desc' => 'Google hosted mail',
- 'options' => \%options,
- 'nodomain' => 'Y',
+ 'svc' => 'svc_acct',
+ 'desc' => 'Google hosted mail',
+ 'options' => \%options,
+ 'nodomain' => 'Y',
+ 'no_machine' => 1,
+ 'default_svc_class' => 'Email',
'notes' => <<'END'
Export accounts to the Google Provisioning API. Requires
REST::Google::Apps::Provisioning from CPAN.
);
}
-sub captcha_url {
+sub auth_error {
my $self = shift;
my $google = $self->google_handle;
- if (exists ($google->{'captcha_url'}) ) {
- return 'http://www.google.com/accounts/'.$google->{'captcha_url'};
- }
- else {
- return '';
+ if ( $google->{'error'} ) {
+ my $url = $google->{'captcha_url'} || '';
+ $url = "http://www.google.com/accounts/$url" if $url;
+ return { 'captcha_url' => $url,
+ 'message' =>
+ 'Unable to connect to the Google API: '.$google->{'error'}.'.',
+ };
}
+ return; #nothing on success
}
sub captcha_auth {