承接 keepxin/token 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

keepxin/token

Composer 安装命令:

composer require keepxin/token

包简介

A Token SDK

README 文档

README

A Token SDK.

Installing

$ composer require keepxin/token -vvv

Usage

CREATE TABLE `api_token` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `app_id` int(11) NOT NULL COMMENT 'app_id',
  `user_id` int(11) NOT NULL COMMENT '用户id',
  `access_token` char(32) COLLATE utf8_unicode_ci NOT NULL COMMENT 'access_token值',
  `access_token_expires` int(11) NOT NULL COMMENT 'access_token有效期',
  `refresh_token` char(32) COLLATE utf8_unicode_ci NOT NULL COMMENT 'refresh_token值',
  `refresh_token_expires` int(11) NOT NULL COMMENT 'refresh_token有效期',
  `created_at` int(11) NOT NULL COMMENT '创建时间',
  `updated_at` int(11) NOT NULL COMMENT '修改时间',
  `platform` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '平台参数',
  `access_secret` varchar(100) COLLATE utf8_unicode_ci NOT NULL COMMENT '用户访问加密秘钥',
  PRIMARY KEY (`id`),
  KEY `api_token_user_id_index` (`user_id`),
  KEY `api_token_access_token_index` (`access_token`)
) ENGINE=InnoDB AUTO_INCREMENT=51 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
 try{
            $result = Token::getToken(1, 1, 'pc');
        }catch (\Exception $exception){
            $message = $exception->getMessage();
            if ($exception instanceof \KeepXin\Token\Exceptions\InvalidConfigException) {
                $message = '参数配置错误'.$message;
            } else if ($exception instanceof \KeepXin\Token\Exceptions\ErrorDbException) {
                $message = '数据库操作失败'.$message;
            }
            dd($message);
        }

Contributing

You can contribute in one of three ways:

  1. File bug reports using the issue tracker.
  2. Answer questions or fix bugs on the issue tracker.
  3. Contribute new features or update the wiki.

The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-10-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固