nestjs_auth...
This commit is contained in:
parent
5efa84b054
commit
48fff9f5d4
@ -17,15 +17,15 @@ export class AuthController {
|
|||||||
return await this.authService.login(req.user)
|
return await this.authService.login(req.user)
|
||||||
}
|
}
|
||||||
|
|
||||||
//jwt.strategy의 validate에서 true인경우 넘어옴
|
//jwt.accesstoken.stragy의 validate에서 true인경우 넘어옴
|
||||||
@UseGuards(JwtAccessTokenGuard)
|
@UseGuards(JwtAccessTokenGuard)
|
||||||
@Get('profile')
|
@Get('profile')
|
||||||
async profile(@Request() req) {
|
async profile(@Request() req) {
|
||||||
return req.user
|
return req.user
|
||||||
}
|
}
|
||||||
|
|
||||||
//jwt.strategy의 validate에서 true인경우 넘어옴
|
//jwt.refreshtoken.stragy의 validate에서 true인경우 넘어옴
|
||||||
@UseGuards(JwtRefreshTokenGuard)
|
//@UseGuards(JwtRefreshTokenGuard)
|
||||||
@Post('reload')
|
@Post('reload')
|
||||||
async reload(@Request() req) {
|
async reload(@Request() req) {
|
||||||
return await this.authService.reload(req.user)
|
return await this.authService.reload(req.user)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user