驗證碼

驗證碼模塊爲前後端提供了驗證碼相關的服務,你可以在此對接口進行測試

Generate

Generate 生成一個有數字英文字符生成的驗證碼

rpc Generate(GenerateRequest) returns (CaptchaResponse){
    option (google.api.http) = {
        post: "/api/v1/captcha/generate"
        body: "*"
    };
}

http 路徑:

/api/v1/captcha/generate

Math

Math 生成一個簡單的數學計算驗證碼

rpc Math (MathRequest) returns (CaptchaResponse){
    option (google.api.http) = {
        post: "/api/v1/captcha/math"
        body: "*"
    };
}

http 路徑:

/api/v1/captcha/math

Verify

Verify 用於驗證用戶輸入的驗證碼是否正確

rpc Verify (VerifyRequest) returns (VerifyResponse){
    option (google.api.http) = {
        post: "/api/v1/captcha/verify"
        body: "*"
    };
}

http 路徑:

/api/v1/captcha/verify