aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App.pm')
-rw-r--r--perllib/FixMyStreet/App.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 6a41d93a9..e367f0332 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -101,9 +101,6 @@ __PACKAGE__->config(
use_session => 0,
credential => {
class => 'AccessToken',
- token_field => 'extra',
- # This means the token has to be 18 characters long (as generated by AuthToken)
- token_lookup => { like => "%access_token,T18:TOKEN,%" },
},
store => $store,
},
@@ -517,6 +514,7 @@ Sets the query parameter to the passed variable.
sub set_param {
my ($c, $param, $value) = @_;
$c->req->params->{$param} = $value;
+ $c->req->body_params->{$param} = $value;
}
=head2 check_2fa
@@ -536,6 +534,11 @@ sub check_2fa {
return 0;
}
+sub user_country {
+ my $c = shift;
+ return FixMyStreet::Gaze::get_country_from_ip($c->req->address);
+}
+
=head1 SEE ALSO
L<FixMyStreet::App::Controller::Root>, L<Catalyst>