Issues a jwt token signed by app.vpn.signing_key
Details
Details
- Reviewers
machniak - Group Reviewers
Restricted Project - Commits
- rKf127175fc56e: VPNController
rK8f494e782cb2: VPNController
rKd7cae8cfcf2e: VPNController
Diff Detail
Diff Detail
- Repository
- rK kolab
- Branch
- dev/mollekopf
- Lint
Lint Errors Severity Location Code Message Error src/app/Http/Controllers/API/V4/VPNController.php:38 phpstan Method App\Http\Controllers\API\V4\VPNController::token() should return Illuminate\Http\Response but returns Illuminate\Http\JsonResponse. - Unit
No Test Coverage - Build Status
Buildable 43127 Build 17294: arc lint + arc unit
Event Timeline
src/tests/Feature/Controller/VPNTest.php | ||
---|---|---|
55 | I have this usage from https://lcobucci-jwt.readthedocs.io/en/latest/quick-start/ ((under "Parsing tokens"), not sure what's up with the linting, but I'll have to test the signature verification indeed. |
src/app/Http/Controllers/API/V4/VPNController.php | ||
---|---|---|
27 | This check is redundant. The route requires authentication. I'd remove this. It will fix the linting issue. | |
31 | I'd like to see the option described in config/app.php. Also, should we throw an exception when it's not set? | |
41 | Do we really not want to return JSON to be consistent with the whole API? | |
src/tests/Feature/Controller/VPNTest.php | ||
101 | These linting errors are probably JWT issues, but we should silence them. Maybe telling phpstan what exactly $token is (Lcobucci\JWT\UnencryptedToken?) would fix it. |