aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Auth.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Auth.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Auth.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Auth.pm b/perllib/FixMyStreet/App/Controller/Auth.pm
index 80e407147..455022e03 100644
--- a/perllib/FixMyStreet/App/Controller/Auth.pm
+++ b/perllib/FixMyStreet/App/Controller/Auth.pm
@@ -419,6 +419,8 @@ Mainly intended for testing but might also be useful for ajax calls.
sub check_auth : Local {
my ( $self, $c ) = @_;
+ $c->authenticate(undef, 'access_token') unless $c->user;
+
# choose the response
my ( $body, $code ) #
= $c->user