1 | <?php |
||
14 | class JWTAuthServiceProvider extends ServiceProvider |
||
15 | { |
||
16 | /** |
||
17 | * Indicates if loading of the provider is deferred. |
||
18 | * |
||
19 | * @var bool |
||
20 | */ |
||
21 | protected $defer = false; |
||
22 | |||
23 | /** |
||
24 | * Boot the service provider. |
||
25 | */ |
||
26 | public function boot() |
||
36 | |||
37 | /** |
||
38 | * Bind some Interfaces and implementations |
||
39 | */ |
||
40 | protected function bootBindings() |
||
41 | { |
||
42 | $this->app['Tymon\JWTAuth\JWTAuth'] = function ($app) { |
||
43 | return $app['tymon.jwt.auth']; |
||
44 | }; |
||
45 | |||
46 | $this->app['Tymon\JWTAuth\Providers\User\UserInterface'] = function ($app) { |
||
47 | return $app['tymon.jwt.provider.user']; |
||
48 | }; |
||
49 | |||
50 | $this->app['Tymon\JWTAuth\Providers\JWT\JWTInterface'] = function ($app) { |
||
51 | return $app['tymon.jwt.provider.jwt']; |
||
52 | }; |
||
53 | |||
54 | $this->app['Tymon\JWTAuth\Providers\Auth\AuthInterface'] = function ($app) { |
||
55 | return $app['tymon.jwt.provider.auth']; |
||
56 | }; |
||
57 | |||
58 | $this->app['Tymon\JWTAuth\Providers\Storage\StorageInterface'] = function ($app) { |
||
59 | return $app['tymon.jwt.provider.storage']; |
||
60 | }; |
||
61 | |||
62 | $this->app['Tymon\JWTAuth\JWTManager'] = function ($app) { |
||
63 | return $app['tymon.jwt.manager']; |
||
64 | }; |
||
65 | |||
66 | $this->app['Tymon\JWTAuth\Blacklist'] = function ($app) { |
||
67 | return $app['tymon.jwt.blacklist']; |
||
68 | }; |
||
69 | |||
70 | $this->app['Tymon\JWTAuth\PayloadFactory'] = function ($app) { |
||
71 | return $app['tymon.jwt.payload.factory']; |
||
72 | }; |
||
73 | |||
74 | $this->app['Tymon\JWTAuth\Claims\Factory'] = function ($app) { |
||
75 | return $app['tymon.jwt.claim.factory']; |
||
76 | }; |
||
77 | |||
78 | $this->app['Tymon\JWTAuth\Validators\PayloadValidator'] = function ($app) { |
||
79 | return $app['tymon.jwt.validators.payload']; |
||
80 | }; |
||
81 | } |
||
82 | |||
83 | /** |
||
84 | * Register the service provider. |
||
85 | * |
||
86 | * @return void |
||
87 | */ |
||
88 | public function register() |
||
107 | |||
108 | /** |
||
109 | * Register the bindings for the User provider |
||
110 | */ |
||
111 | protected function registerUserProvider() |
||
112 | { |
||
113 | $this->app['tymon.jwt.provider.user'] = $this->app->share(function ($app) { |
||
|
|||
114 | return $app->make($this->config('providers.user'), [$app->make($this->config('user'))]); |
||
115 | }); |
||
116 | } |
||
117 | |||
118 | /** |
||
119 | * Register the bindings for the JSON Web Token provider |
||
120 | */ |
||
121 | protected function registerJWTProvider() |
||
122 | { |
||
123 | $this->app['tymon.jwt.provider.jwt'] = $this->app->share(function ($app) { |
||
124 | |||
125 | $secret = $this->config('secret'); |
||
126 | $algo = $this->config('algo'); |
||
127 | $provider = $this->config('providers.jwt'); |
||
128 | |||
129 | return $app->make($provider, [$secret, $algo]); |
||
130 | }); |
||
131 | } |
||
132 | |||
133 | /** |
||
134 | * Register the bindings for the Auth provider |
||
135 | */ |
||
136 | protected function registerAuthProvider() |
||
142 | |||
143 | /** |
||
144 | * Register the bindings for the Storage provider |
||
145 | */ |
||
146 | protected function registerStorageProvider() |
||
152 | |||
153 | /** |
||
154 | * Register the bindings for the Payload Factory |
||
155 | */ |
||
156 | protected function registerClaimFactory() |
||
162 | |||
163 | /** |
||
164 | * Register the bindings for the JWT Manager |
||
165 | */ |
||
166 | protected function registerJWTManager() |
||
179 | |||
180 | /** |
||
181 | * Register the bindings for the main JWTAuth class |
||
182 | */ |
||
183 | protected function registerJWTAuth() |
||
197 | |||
198 | /** |
||
199 | * Register the bindings for the main JWTAuth class |
||
200 | */ |
||
201 | protected function registerJWTBlacklist() |
||
207 | |||
208 | /** |
||
209 | * Register the bindings for the payload validator |
||
210 | */ |
||
211 | protected function registerPayloadValidator() |
||
217 | |||
218 | /** |
||
219 | * Register the bindings for the Payload Factory |
||
220 | */ |
||
221 | protected function registerPayloadFactory() |
||
229 | |||
230 | /** |
||
231 | * Register the Artisan command |
||
232 | */ |
||
233 | protected function registerJWTCommand() |
||
239 | |||
240 | /** |
||
241 | * Helper to get the config values |
||
242 | * |
||
243 | * @param string $key |
||
244 | * @return string |
||
245 | */ |
||
246 | protected function config($key, $default = null) |
||
250 | |||
251 | /** |
||
252 | * Get an instantiable configuration instance. Pinched from dingo/api :) |
||
253 | * |
||
254 | * @param mixed $instance |
||
255 | * @return object |
||
256 | */ |
||
257 | protected function getConfigInstance($instance) |
||
267 | } |
||
268 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.