code/authenticators/JwtAuth.php 1 location
|
@@ 76-78 (lines=3) @@
|
73 |
|
} catch(RestUserException $e) { |
74 |
|
throw $e; |
75 |
|
} catch(\Exception $e) { |
76 |
|
if(\Director::isDev() && $token == \Config::inst()->get('JwtAuth', 'DevToken')) { |
77 |
|
return \DataObject::get(\Config::inst()->get('BaseRestController', 'Owner'))->first(); |
78 |
|
} |
79 |
|
} |
80 |
|
throw new RestUserException("Token invalid", 403); |
81 |
|
} |
code/authenticators/TokenAuth.php 1 location
|
@@ 72-74 (lines=3) @@
|
69 |
|
throw new RestUserException("Owner not found in database", 404); |
70 |
|
} |
71 |
|
return $user; |
72 |
|
} else if(\Director::isDev() && $token == \Config::inst()->get('TokenAuth', 'DevToken')) { |
73 |
|
return \DataObject::get(\Config::inst()->get('BaseRestController', 'Owner'))->first(); |
74 |
|
} |
75 |
|
throw new RestUserException("Owner not found in database", 404); |
76 |
|
} |
77 |
|
|