All Projects → yiyungent → SimCaptcha

yiyungent / SimCaptcha

Licence: MIT License
✅ 一个简单易用的点触验证码 (前端+后端)

Programming Languages

C#
18002 projects
powershell
5483 projects

Projects that are alternatives of or similar to SimCaptcha

Portable-WebDAV-Library
Moved to codeberg.org - https://codeberg.org/DecaTec/Portable-WebDAV-Library - The Portable WebDAV Library is a strongly typed, async WebDAV client library which is fully compliant to RFC 4918, RFC 4331 and "Additional WebDAV Collection Properties". It is implemented as .NETStandard 1.1 library in oder to be used on any platform supporting .NETS…
Stars: ✭ 45 (-8.16%)
Mutual labels:  netcore, netstandard
dotnet
.NET Community Toolkit is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. The toolkit is maintained and published by Microsoft, and part of the .NET Foundation.
Stars: ✭ 865 (+1665.31%)
Mutual labels:  netcore, netstandard
Decor.NET
A simple way to decorate a class with additional functionality using attributes.
Stars: ✭ 29 (-40.82%)
Mutual labels:  netcore, netstandard
NETProvider
Firebird ADO.NET Data Provider
Stars: ✭ 113 (+130.61%)
Mutual labels:  netcore, netstandard
AvroConvert
Apache Avro serializer for .NET
Stars: ✭ 44 (-10.2%)
Mutual labels:  netcore, netstandard
DotNetGraph
Create GraphViz DOT graph with .NET / C#
Stars: ✭ 57 (+16.33%)
Mutual labels:  netcore, netstandard
ActiveLogin.Identity
Parsing and validation of Swedish identities such as Personal Identity Number (svenskt personnummer) in .NET.
Stars: ✭ 51 (+4.08%)
Mutual labels:  netcore, netstandard
SharpAudio
Audio playback/capturing engine for C#
Stars: ✭ 139 (+183.67%)
Mutual labels:  netcore, netstandard
EPPlus4PHP
an easy-to-use excel library for php project which is compiled with peachpie. NOT FOR THE COMMON PHP PROJECT!
Stars: ✭ 15 (-69.39%)
Mutual labels:  netcore, netstandard
AmiClient
Modern .NET Standard client for accessing the Asterisk AMI protocol using async/await and Reactive Extensions (Rx)
Stars: ✭ 30 (-38.78%)
Mutual labels:  netcore, netstandard
dark-sky-core
A .NET Standard Library for using the Dark Sky API.
Stars: ✭ 55 (+12.24%)
Mutual labels:  netcore, netstandard
onvif-discovery
C# .NetStandard 2.0 library to discover ONVIF compliant devices
Stars: ✭ 29 (-40.82%)
Mutual labels:  netcore, netstandard
Kendo.DynamicLinqCore
KendoNET.DynamicLinq implements server paging, filtering, sorting, grouping, and aggregating to Kendo UI via Dynamic Linq for .Net Core App(1.x ~ 3.x).
Stars: ✭ 36 (-26.53%)
Mutual labels:  netcore, netstandard
DjvuNet
DjvuNet is a cross platform fully managed .NET library for working with Djvu documents which can run on Linux, macOS and Windows. Library has been written in C# and targets .NET Core v3.0 and .NET Standard v2.1 or later. We intend to provide DjVu document processing capabilities on par with DjVuLibre reference library (or even better).
Stars: ✭ 54 (+10.2%)
Mutual labels:  netcore, netstandard
Autofac.Configuration
Configuration support for Autofac IoC
Stars: ✭ 35 (-28.57%)
Mutual labels:  netcore, netstandard
AlphaVantage.Net
.Net client library for Alpha Vantage API
Stars: ✭ 65 (+32.65%)
Mutual labels:  netcore, netstandard
Platform Compat
Roslyn analyzer that finds usages of APIs that will throw PlatformNotSupportedException on certain platforms.
Stars: ✭ 250 (+410.2%)
Mutual labels:  netcore, netstandard
Hei.captcha
一个跨平台的图形验证码生成工具包/.net core
Stars: ✭ 172 (+251.02%)
Mutual labels:  captcha, netcore
DotNetDynamicInjector
💉 Dynamically reference external dlls without the need to add them to the project. Leave your project with low dependency and allowing specific dlls according to your business rule or database parameters.
Stars: ✭ 18 (-63.27%)
Mutual labels:  netcore, netstandard
Cosmos.Identity
A Cosmos storage provider for ASP.NET Core Identity.
Stars: ✭ 26 (-46.94%)
Mutual labels:  netcore, netstandard

SimCaptcha

SimCaptcha

🍰 一个简单易用的点触验证码, 包含了前端与后端实现

repo size LICENSE QQ Group

介绍

一个简单易用的点触验证码促进你的开发

  • 简单 - 约定优于配置, 以最少的配置帮助你专注于业务
  • 易扩展 - 通过实现各个验证组件接口,再借助于 ASP.NET Core 依赖注入,轻松扩展自己的验证策略
  • 开箱即用 - 使用现有 Web SDK 接入后端验证
  • 安全 - 验证图片,效验信息均服务端生成并保存
  • 分布式 - 支持通过实现 ICache 接口替换默认本地缓存方案
  • 轻松定制 - 简单配置即可自定义过期时间,失效次数,背景图片,字体等

在线演示

前后端调用时序图

依赖

只需要满足下方其中一条.

  • .NET Framework (>= 4.0) 被安装.
  • .NET Standard (>= 2.0) 被安装.

安装

推荐使用 NuGet, 在你项目的根目录 执行下方的命令, 如果你使用 Visual Studio, 这时依次点击 Tools -> NuGet Package Manager -> Package Manager Console , 确保 "Default project" 是你想要安装的项目, 输入下方的命令进行安装.

PM> Install-Package SimCaptcha

在 ASP.NET Core 下使用

PM> Install-Package SimCaptcha.AspNetCore

快速开始

在 ASP.NET Core 下 三步搭建验证服务端

// Startup.cs 
// 注意: 省略了部分代码, 只保留主要部分, 详见示例(/examples/EasyAspNetCoreService)
// 仅适用于 SimCaptcha.AspNetCore v0.3.0+
public void ConfigureServices(IServiceCollection services)
{
    // 1.重要: 注册验证码配置
    services.Configure<SimCaptchaOptions>(Configuration.GetSection(SimCaptchaOptions.SimCaptcha));

    // 2.添加 SimCaptcha
    services.AddSimCaptcha();
}

public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
    // 3.启用 SimCaptcha 中间件
    app.UseSimCaptcha();

    // 现在
    // "https://yourdomain.com/api/SimCaptcha/Img", "https://yourdomain.com/api/SimCaptcha/Check", "https://yourdomain.com/api/SimCaptcha/TicketVerify"
    // 将开始工作
}

Docker 快速部署

下方为部署验证码服务端:

docker run -d -p 5004:80 -e ASPNETCORE_URLS="http://*:80" --name simcaptcha-container yiyungent/simcaptcha

注意:若使用 Docker 同时部署验证码服务端,业务(客户)端,
需注意Docker容器隔离,默认容器之间无法网络通信,
需使其在一个网络下,用于客户端访问服务端验证票据,可参考仓库根目录 docker-compose.yml
同时,若客户端与服务端非同源域名,
需注意跨域问题,Docker下验证码服务端配置文件:/app/appsettings.Docker.json
事实上,若使用 Docker快速部署验证服务端,
则一定要修改 /app/appsettings.Docker.json 其中的 SimCaptcha.AppList.CorsWhiteList,添加上你的客户端域名。

使用

版本依赖

SimCaptcha 0.0.1 0.1.0 0.2.0
SimCaptcha.AspNetCore 0.0.1 0.1.0-0.2.0 0.3.0
sim-captcha-js 0.0.1-0.0.4 0.0.1-0.1.0 0.0.1-0.1.0
vue-sim-captcha 0.0.1-0.0.3 0.0.1-0.1.1 0.0.1-0.1.1
SimCaptcha nuget downloads
SimCaptcha.AspNetCore nuget downloads

Q&A

Q: 为什么选择 SimCaptcha ? A: 流行开源验证码及商业验证码 对照表如下:
TODO: 流行开源验证码及商业验证码 对照表

环境

  • 运行环境: .NET Framework (>= 4.0) or .NET Standard (>= 2.0)
  • 开发环境: Visual Studio Community 2019

相关项目

鸣谢

Donate

SimCaptcha is an MIT licensed open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing.

We accept donations through these channels:

Author

SimCaptcha © yiyun, Released under the MIT License.
Authored and maintained by yiyun with help from contributors (list).

GitHub @yiyungent

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].