MCPcopy Create free account

hub / github.com/Houserqu/nestjs-start / functions

Functions49 in github.com/Houserqu/nestjs-start

↓ 8 callersMethodfindOne
(phone: string)
src/modules/user/user.service.ts:15
↓ 8 callersMethodget
* axios GET 请求 * @param url * @param config
src/modules/helper/helper.service.ts:29
↓ 5 callersFunctiongetWinstonConfig
(label: string)
src/common/logger.ts:12
↓ 4 callersMethodcommand
* 执行 redis 命令(该方法可以执行任何命令,可以在该方法基础上给特定命令封装方法) * @param command * @param arg
src/modules/cache/redis.service.ts:29
↓ 2 callersFunctionWXBizDataCrypt
(appId, sessionKey, encryptedData, iv)
src/utils/crypto-util.ts:35
↓ 1 callersMethodbindPhone
(phone: string, userId: number)
src/modules/user/user.service.ts:87
↓ 1 callersFunctionbootstrap
()
src/main.ts:10
↓ 1 callersMethodcreateByWechat
(createWeAppUserDto: CreateWeAppUserDto)
src/modules/user/user.service.ts:60
↓ 1 callersMethodfindOneByUnionid
(unionid: string)
src/modules/user/user.service.ts:31
↓ 1 callersMethodfindUserByID
(id: number)
src/modules/user/user.service.ts:23
↓ 1 callersMethodloginByPassword
* 手机号和密码登录(jwt) * * @param {LoginDto} loginDto * @returns {Promise<any>} * @memberof AuthService
src/modules/auth/auth.service.ts:44
↓ 1 callersMethodloginByWeApp
* 小程序登录(unionid 方式) * @param {WeAppLoginDto} weAppLoginDto * @returns {Promise<any>} * @memberof AuthService
src/modules/auth/auth.service.ts:69
↓ 1 callersFunctionsignEncrypt
(algorithm, content)
src/utils/crypto-util.ts:66
↓ 1 callersMethodvalidateUser
* 手机号 和 密码 校验用户 * @param {string} phone * @param {string} password * @returns {Promise<any>} * @memberof AuthService
src/modules/auth/auth.service.ts:28
FunctionPermission
(...permissions: string[])
src/modules/auth/permission.decorator.ts:7
FunctionRequestMiddleware
(req: Request, res: Response, next: NextFunction)
src/common/request.middleware.ts:9
Methodaxios
* axios 自定义请求 * @param config
src/modules/helper/helper.service.ts:46
MethodbindWechatPhone
* 通过小程序获取手机号并绑定 * @param {string} code * @param {string} encryptedData * @param {string} iv * @param {number} userId * @returns {Promis
src/modules/auth/auth.service.ts:145
MethodbindWechatPhone
(@Body() decodePhoneDto: DecodePhoneDto, @Req() req)
src/modules/auth/auth.controller.ts:75
MethodcanActivate
(context: ExecutionContext)
src/modules/auth/permission.guard.ts:14
Methodcatch
(exception: any, host: ArgumentsHost)
src/common/exception.filter.ts:10
Methodconstructor
( )
src/modules/cache/redis.service.ts:12
Methodconstructor
( private redisService: RedisService )
src/modules/cache/cache.controller.ts:6
Methodconstructor
( private readonly userService: UserService, private readonly jwtService: JwtService, private read
src/modules/auth/auth.service.ts:15
Methodconstructor
()
src/modules/auth/jwt.strategy.ts:8
Methodconstructor
(private readonly authService: AuthService)
src/modules/auth/local.strategy.ts:8
Methodconstructor
( private reflector: Reflector, )
src/modules/auth/permission.guard.ts:10
Methodconstructor
( private readonly userService: UserService, private readonly authService: AuthService, )
src/modules/auth/auth.controller.ts:14
Methodconstructor
( @InjectModel(User) private userRepository: typeof User, )
src/modules/user/user.service.ts:10
Methodconstructor
( private httpService: HttpService, )
src/modules/helper/helper.service.ts:7
Methodconstructor
(code: string, message?: string, data?: any)
src/common/error.exception.ts:7
Methodconstructor
()
src/common/transform.interceptor.ts:15
Methodconstructor
()
src/common/exception.filter.ts:8
Methodcreate
(createUserDto: CreateUserDto)
src/modules/user/user.service.ts:39
Functiondecrypt
(dataStr, key, iv)
src/utils/crypto-util.ts:10
Functionencrypt
(dataStr, key, iv)
src/utils/crypto-util.ts:26
Methodexample
()
src/modules/cache/cache.controller.ts:15
Methodget
* 获取 字符串类型 值(基于 command 封装) * @param {string} key
src/modules/cache/redis.service.ts:41
MethodgetHello
(@Res() res: Response)
src/modules/app/app.controller.ts:8
MethodgetJwtPayload
* 根据 jwt token 获取 payload * @param {string} token * @returns {Promise<any>}
src/modules/auth/auth.service.ts:178
MethodgetProfile
(@Request() req)
src/modules/auth/auth.controller.ts:27
FunctiongetRequestId
(request: Request)
src/modules/helper/helper.utils.ts:6
Methodintercept
( context: ExecutionContext, next: CallHandler<T>, )
src/common/transform.interceptor.ts:17
Methodlogin
(@Body() loginDto: LoginDto, @Res() res)
src/modules/auth/auth.controller.ts:44
Methodpost
* axios POST 请求 * @param url * @param config
src/modules/helper/helper.service.ts:38
Functionsha1
(content)
src/utils/crypto-util.ts:76
Methodvalidate
* jwt 校验方法 * 在这之前 jwt 生成的 token 已经通过校验,是安全有效的,所以这里可以直接返回 payload,并自动挂载在请求上下文中(req.user) * 也可以在这里做一些额外查询/校验逻辑 * 安全问题:jwt 一旦签发之后,服务端无法主动销毁,存在被盗
src/modules/auth/jwt.strategy.ts:23
Methodvalidate
(phone: string, password: string)
src/modules/auth/local.strategy.ts:12
Methodwxlogin
(@Body() weAppLoginDto: WeAppLoginDto, @Res() res: Response)
src/modules/auth/auth.controller.ts:60