check JWT server side for for specific calls #18
Labels
No Label
Bug
Critical
Feature
Improvement
Question
Text Improvement
timo
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: aknuth/bizmatch-project#18
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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