Conditions | 3 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
15 | public function getTokenData() |
||
16 | { |
||
17 | // the absolute params property must be present |
||
18 | // in the object and the params value must be the builder key. |
||
19 | if(property_exists($this,'params') and isset($this->params['builder'])){ |
||
20 | |||
21 | // a real token will be generated after |
||
22 | // you get the first method of the query builder value. |
||
23 | $authData = $this->params['data']; |
||
24 | |||
25 | // we refer to the token closure feature on the config to enable |
||
26 | // the creation of user-based tokens on the application side. |
||
27 | return $this->getTokenFromProvider($authData,function() use($authData){ |
||
28 | return md5(sha1($authData->id.'__'.$this->credentialHash.'__'.time().'__'.fingerPrint())); |
||
29 | }); |
||
30 | } |
||
31 | |||
32 | return null; |
||
33 | } |
||
53 | } |