Captcha Gateway

This commit is contained in:
2025-03-22 19:48:19 +08:00
parent ba1d96b118
commit 62dcbbf424
14 changed files with 474 additions and 5 deletions

View File

@@ -0,0 +1,14 @@
package grpc
import (
"context"
"git.solsynth.dev/hypernet/nexus/pkg/internal/captcha"
"git.solsynth.dev/hypernet/nexus/pkg/proto"
)
func (v *Server) CheckCaptcha(_ context.Context, req *proto.CheckCaptchaRequest) (*proto.CheckCaptchaResponse, error) {
return &proto.CheckCaptchaResponse{
IsValid: captcha.Validate(req.Token, req.RemoteIp),
}, nil
}