Make google url configurable
Errietta Kostala [Wed, 21 Jan 2015 16:48:38 +0000 (16:48 +0000)]
lib/stemmaweb/Authentication/Credential/Google.pm
stemmaweb.conf

index 20afff8..07a3c5f 100644 (file)
@@ -90,7 +90,7 @@ Decoded JSON object containing certificates.
 sub retrieve_certs {
     my ($self, $url) = @_;
 
-    $url ||= 'https://www.googleapis.com/oauth2/v1/certs';
+    $url ||= ( $self->{_app}->config->{'Authentication::Credential::Google'}->{url} || 'https://www.googleapis.com/oauth2/v1/certs' );
     return decode_json(get($url));
 }
 
index 3206617..0425d7b 100644 (file)
@@ -10,3 +10,6 @@ name = stemmaweb
 <Model Directory>
     dsn dbi:SQLite:dbname=db/traditions.db
 </Model>
+<Authentication::Credential::Google>
+    url https://www.googleapis.com/oauth2/v1/certs
+</Authentication::Credential::Google>