Modules/Auth/ServerRoutes/AuthRoutes.php
// useless function (example how to use token)
useless function (example how to use token)
useless function ( example how to use token )
public static function checkToken($request){
        $authHeader = $request->getHeader("Authorization");
        if ($authHeader) {
            try{
                $headerInfo = \explode(" ", $authHeader);
                $jwt = $headerInfo[1];
                $secretKey = Configuration::get('jwtkey');
                $token = JWT::decode($jwt, $secretKey, array('HS512'));
                return true;
            } catch (Exception $ex) {
                return false;
            }
        }
        return false;
    }
public static function checkToken ( $ request ) { $ authHeader = $ request -> getHeader ( " Authorization " ) ; if ( $ authHeader ) { try { $ headerInfo = \ explode ( " " , $ authHeader ) ; $ jwt = $ headerInfo [ 1 ] ; $ secretKey = Configuration :: get ( 'jwtkey' ) ; $ token = JWT :: decode ( $ jwt , $ secretKey , array ( 'HS512' ) ) ; return true ; } catch ( Exception $ ex ) { return false ; } } return false ; }
useless function (example how to use token)
useless function ( example how to use token )