Git Product home page Git Product logo

authotp's Introduction

AuthOTP

golang实现google authencatior服务器RestAPI(密钥生成、OTP生成、OTP认证 )

API 接口

/register

  • 用途: 生成私有密钥(base64编码)
  • 方法: GET
  • 参数:无
  • 返回:seed密钥(string)

/otp

  • 用途: 通过私有密钥,生成OTP一次性密码
  • 方法: POST
  • 参数: 请求体JSON格式 ,skey 私有密钥
  • 返回: otp密码 (string)
Post Body:
{
"skey":"GI3TSYRWGMZWEZRTMNSGMYRXGFTDSODFGI4DEMRXHE3GKZDBGY2TKM3FMQYWMNDG"
}

/auth

  • 用途: 验证OTP一次性密码
  • 方法: POST
  • 参数: 请求体JSON格式 ,skey 私有密钥 otp 需认证的密码
  • 返回: true/false
Post Body:
{
"skey":"GI3TSYRWGMZWEZRTMNSGMYRXGFTDSODFGI4DEMRXHE3GKZDBGY2TKM3FMQYWMNDG",
"otp":"712257"
}

authotp's People

Contributors

gotoolkits avatar

Watchers

 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.