add client ID

This commit is contained in:
ginuerzh
2023-09-19 22:32:40 +08:00
parent 288089404a
commit 0e42c7c67e
16 changed files with 134 additions and 71 deletions

View File

@ -31,6 +31,7 @@ func (s *server) Authenticate(ctx context.Context, in *proto.AuthenticateRequest
reply := &proto.AuthenticateReply{}
if in.GetUsername() == "gost" && in.GetPassword() == "gost" {
reply.Ok = true
reply.Id = "gost"
}
log.Printf("auth: %s, %s, %v", in.GetUsername(), in.GetPassword(), reply.Ok)
return reply, nil