All Downloads are FREE. Search and download functionalities are using the official Maven repository.

shz.core.verify.VerifyManager Maven / Gradle / Ivy

There is a newer version: 2024.0.2
Show newest version
package shz.core.verify;

import shz.core.msg.ClientFailureMsg;

public interface VerifyManager {
    boolean generate(T verifiable);

    VerifyResult verify(T verifiable);

    default void check(T verifiable) {
        VerifyResult verify = verify(verifiable);
        ClientFailureMsg.requireNon(verify == VerifyResult.NOT_EXIST, "验证码已失效");
        ClientFailureMsg.requireNon(verify == VerifyResult.ERROR, "验证码错误");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy