public function refresh(ResponseFactory $response, JWTAuth $auth)
    {
        try {
            $token = $auth->parseToken()->refresh();
        } catch (JWTException $e) {
            throw new UnauthorizedHttpException('jwt-auth', $e->getMessage());
        }

        return $response->json(['token' => $token]);
    }
public function refresh(ResponseFactory $response, JWTAuth $auth)
    {
        try {
            $token = $auth->parseToken()->refresh();
        } catch (JWTException $e) {
            throw new UnauthorizedHttpException('jwt-auth', $e->getMessage());
        }

        return $response->json(['token' => $token]);
    }
public function refresh ( ResponseFactory $ response , JWTAuth $ auth ) { try { $ token = $ auth -> parseToken ( ) -> refresh ( ) ; } catch ( JWTException $ e ) { throw new UnauthorizedHttpException ( 'jwt-auth' , $ e -> getMessage ( ) ) ; } return $ response -> json ( [ 'token' => $ token ] ) ; }
Refresh user token.

@Get(uri="refresh")
@Request(contentType="application/json")
@Transaction({
@Response(200, body={"token": "xxx"}),
})
Refresh user token .