Coder Social home page Coder Social logo

ljia310 / captcha Goto Github PK

View Code? Open in Web Editor NEW

This project forked from anji-plus/captcha

0.0 2.0 0.0 24.53 MB

行为验证码(滑动拼图、点选文字),前后端(java)交互,包含h5/Android/IOS/flutter/uni-app的源码和实现

Home Page: https://mirror.anji-plus.com/captcha-web/

License: Apache License 2.0

Java 85.38% Kotlin 3.30% Swift 3.05% Objective-C 3.13% Dart 3.24% Ruby 0.04% SCSS 0.14% Less 0.10% PHP 0.85% TypeScript 0.76%

captcha's Introduction

1 在线体验

  1.1 电脑在线体验:https://captcha.anji-plus.com/

  1.2 微信小程序和H5在线体验(基于uni-app实现)

   如果图片未能正常展示,可查看码云,和github同步 码云
微信小程序  h5
    微信小程序Demo            uni-app H5 demo

2 功能概述

  2.1 组件介绍

   行为验证码采用嵌入式集成方式,接入方便,安全,高效。抛弃了传统字符型验证码展示-填写字符-比对答案的流程,采用验证码展示-采集用户行为-分析用户行为流程,用户只需要产生指定的行为轨迹,不需要键盘手动输入,极大优化了传统验证码用户体验不佳的问题;同时,快速、准确的返回人机判定结果。目前对外提供两种类型的验证码,其中包含滑动拼图、文字点选。如图1-1、1-2所示。若希望不影响原UI布局,可采用弹出式交互。
滑动拼图点选文字
     图1-1 滑动拼图(水印自定义)              图1-2 文字点选(水印自定义)

  2.2 概念术语描述

术语 描述
验证码类型 1)滑动拼图 blockPuzzle 2)文字点选 clickWord
验证 用户拖动/点击一次验证码拼图即视为一次“验证”,不论拼图/点击是否正确
二次校验 验证数据随表单提交到后台后,后台需要调用captchaService.verification做二次校验。目的是核实验证数据的有效性。

3 交互流程

① 用户访问应用页面,请求显示行为验证码
② 用户按照提示要求完成验证码拼图/点击
③ 用户提交表单,前端将第二步的输出一同提交到后台
④ 验证数据随表单提交到后台后,后台需要调用captchaService.verification做二次校验。
⑤ 第4步返回校验通过/失败到产品应用后端,再返回到前端。如下图所示。 时序图

4 目录结构

├─core
│ ├─captcha    java核心源码
│ └─captcha-spring-boot-starter    springboot快速启动
├─images       效果图
├─service
│ ├─springboot    后端为springboot项目示例
│ └─springmvc    后端为springmvc非springboot项目示例
└─view       多语言客户端示例
 ├─android    原生android实现示例
 ├─angular    angular实现示例
 ├─flutter    flutter实现示例
 ├─html    原生html实现示例
 ├─ios    原生ios实现示例
 ├─php    php实现示例
 ├─uni-app    uni-app实现示例
 └─vue    vue实现示例

5 接入文档

  5.1 本地启动

  第一步,启动后端,导入Eclipse或者Intellij,启动service/springboot的StartApplication。社区底图库
  第二步,启动前端,使用visual code打开文件夹view/vue,npm install后npm run dev,浏览器登录

npm install
npm run dev

DONE  Compiled successfully in 29587ms                       12:06:38
I  Your application is running here: http://localhost:8081

 详细的前后端接入文档,后端示例代码service目录下,前端示例代码view目录下。

6 近期计划

  6.1 增加weex示例

  6.2 增加ReactNative示例(已添加)

7 技术支持微信群

微信一群已满,现开放二群。github可能有缓存,不会自动更新。
微信群地址:https://captcha.anji-plus.com/static/weixin.png

开源不易,劳烦各位star ☺

captcha's People

Contributors

bigbigsky avatar coding-now avatar lltx avatar qlsjj avatar raodeming avatar wemooly avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.