check JWT server side for for specific calls #18
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
JwtStrategy sowie JwtAuthGuard && OptionalJwtAuthGuard implementiert. Der Access Token wird übermittelt und kann im Endpunkt über req.user?.username abgefragt werden.
@UseGuards(OptionalJwtAuthGuard) @Get('user/:userid') findByUserId(@Request() req, @Param('userid') userid: string): any { console.log(req.user?.username); return this.listingsService.findByUserId(userid, commercials, req.user?.username); }JwtAuthGuard: token must be present
AdminAuthGuard: token + Admin Role must be present
OptionalJwtAuthGuard: Token will be taken for user infos if present