定制 infinety-es/token 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

infinety-es/token

Composer 安装命令:

composer require infinety-es/token

包简介

Custom token generation

README 文档

README

Manages random tokens for password resets and other one-time actions

Installation

  • Install via composer: composer require infinety-es/token

  • Add services provider to config/app.php:

    • Infinety\Token\TokenServiceProvider::class,
  • Run php artisan token:migration then php artisan migrate to add the Token database table

Usage

  • Tokens are handled via Infinety\Token\Token, which can be instantiated by the container. Example:
  $token = new Token;
  $token->add($myId, 'test', 1)
  • Token parameters:
    • Reference: integer ID of the object referred to by the token, e.g. User ID
    • Type: string determining the type of the token
    • Expires: integer determining how many minutes the token will remain valid for, null (forever) is default
  • Token::new(int $ref, string $type, int $expires = null) returns a hasID 40-character code
  • Token::find(string $code, string $type, bool $$returnRef = true) returns the reference ID or null if $returnId is = true, or Hashids decoded strings
  • Token::remove(string $code, string $type) deletes the token associated with the code (if found)

统计信息

  • 总下载量: 11
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 11
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固