Subject: | session and scope should be modifiable |
The scope and session variables should be modifiable by the user:
sub new {
my ($klass, $options) = @_;
my $self = bless {}, $klass;
$self->{private_key_filename} = $options->{private_key_filename};
$self->{scope} = $options->{scope} ||
'http://www.google.com/m8/feeds/contacts';
$self->{session} = $options->{session} || 0;
$self->{secure} = $options->{secure} || 0;
return $self;
}
sub get_authorization_url {
my ($self, $next_url) = @_;
my $google_url =
URI->new("http://www.google.com/accounts/AuthSubRequest");
$google_url->query_param('next' => $next_url);
$google_url->query_param('scope' => $self->{scope});
$google_url->query_param('session' => $self->{session});
$google_url->query_param('secure' => $self->{secure});
return $google_url;
}