【文件属性】:
文件名称:authentication_api:身份验证api
文件大小:49KB
文件格式:ZIP
更新时间:2021-02-20 08:42:50
Ruby
认证API
Ruby版本2.3.1
系统依赖
rspec-rails
factory_girl_rails
shoulda_matchers
骗子
database_cleaner
jwt
加密
配置
关于短信的配置sms:
company: 云片网
expires_in: 3600 # second
数据库创建
sqlite3
如何运行测试套件
在项目目录下输入rspec
测试参考(都是post方式)
获取短信验证码:
参数:mobile:'xxx'
一个小时内只能发送三次,超过三次之后的请求都只返回最后有效的验证码
XMLhttp 参数:mobile:'xxx',validate_code:'xxx'
登录
参数:mobile:'xxx',validate_code:'xxx'
或参数:手机:“ xxx”,密码:“ xxx”
注册后设置密码
参数:密码:“ x
【文件预览】:
authentication_api-master
----log()
--------.keep(0B)
----public()
--------robots.txt(98B)
----config.ru(130B)
----db()
--------seeds.rb(370B)
--------schema.rb(1KB)
--------migrate()
----tmp()
--------.keep(0B)
----lib()
--------tasks()
----Gemfile(2KB)
----spec()
--------models()
--------auth()
--------controllers()
--------spec_helper.rb(5KB)
--------rails_helper.rb(3KB)
--------factories()
--------support()
----Rakefile(227B)
----config()
--------initializers()
--------application.rb(1KB)
--------environments()
--------locales()
--------boot.rb(128B)
--------spring.rb(111B)
--------cable.yml(164B)
--------secrets.yml(1KB)
--------puma.rb(2KB)
--------routes.rb(301B)
--------database.yml(594B)
--------application.yml(157B)
--------environment.rb(128B)
----README.md(1KB)
----.rubocop.yml(950B)
----.rspec(22B)
----Gemfile.lock(4KB)
----.gitignore(505B)
----app()
--------views()
--------models()
--------auth()
--------controllers()
--------lib()
--------channels()
--------mailers()
--------jobs()
----bin()
--------setup(921B)
--------bundle(129B)
--------rake(213B)
--------rails(264B)
--------update(782B)
--------spring(507B)
----vendor()
--------.keep(0B)