1 | <?php namespace Lahaxearnaud\U2f\Http\Controllers; |
||
11 | class U2fController extends Controller |
||
12 | { |
||
13 | /** |
||
14 | * @var LaravelU2f |
||
15 | */ |
||
16 | protected $u2f; |
||
17 | |||
18 | /** |
||
19 | * @var Config |
||
20 | */ |
||
21 | protected $config; |
||
22 | |||
23 | /** |
||
24 | * @param LaravelU2f $u2f |
||
25 | * @param Config $config |
||
26 | */ |
||
27 | public function __construct(LaravelU2f $u2f, Config $config) |
||
32 | |||
33 | /** |
||
34 | * @author LAHAXE Arnaud |
||
35 | * |
||
36 | * |
||
37 | * @return mixed |
||
38 | */ |
||
39 | public function registerData() |
||
50 | |||
51 | /** |
||
52 | * @author LAHAXE Arnaud |
||
53 | * |
||
54 | * |
||
55 | * @return \Illuminate\Http\RedirectResponse |
||
56 | */ |
||
57 | public function register(Request $request) |
||
78 | |||
79 | /** |
||
80 | * @author LAHAXE Arnaud |
||
81 | * |
||
82 | * |
||
83 | * @return mixed |
||
84 | */ |
||
85 | public function authData() |
||
100 | |||
101 | /** |
||
102 | * @author LAHAXE Arnaud |
||
103 | * |
||
104 | * |
||
105 | * @return mixed |
||
106 | */ |
||
107 | public function auth(Request $request) |
||
122 | |||
123 | /** |
||
124 | * @author LAHAXE Arnaud |
||
125 | * |
||
126 | * @return mixed |
||
127 | */ |
||
128 | protected function redirectAfterSuccessAuth() |
||
138 | } |
||
139 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: