diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-11-22 11:21:15 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-11-29 15:53:27 +0000 |
commit | 32a4a1455032e954301b1d129d9c70c6bce9606d (patch) | |
tree | 0179df2aeec3239c5006a720fb531942a173649b /perllib/FixMyStreet/App/Controller/Auth.pm | |
parent | 5d485f64d864b236fdfaba1c3cbf452a7331b18d (diff) |
Add an access token authentication credential.
This allows access if you have a token associated with your user.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Auth.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Auth.pm | 2 |
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 |