diuitapi/php-session-helper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

diuitapi/php-session-helper

Composer 安装命令:

composer require diuitapi/php-session-helper

包简介

Diuit Session Token Helper, to make easier the session token creating process

关键字:

README 文档

README

A simple PHP library to help you authenticate your devices from backend easier. It returns session token, which you have to pass to your device and login with it.

Installation

Package is available on Packagist, you can install it using Composer.

composer require diuitapi/php-session-helper

Dependencies

  • PHP 5.4+

Basic usage

Getting session token

Just use the DiuitTokenHelper to get a session token:

use Diuit\DiuitTokenHelper;

$session = (new DiuitTokenHelper())->setAppId('your_app_id') // Configures app ID
                        ->setAppKey('your_app_key') // Configures app key
                        ->setKeyID('your_key_id') // Configures key id for finding public key
                        ->setPrivateKey('file://your_pem_file_path') // Configures private key (you can either use file path or plain text)
                        ->setUserSerial('user_serial') // Configures user serial
                        ->setExpDuration(7*24*3600) // Configures length of session valid duration (in seconds), example is in length of a week
                        ->getSessionToken('your_device_serial', 'gcm', 'device_push_token'); // Configures device serial, platform and push token(optional) and retrieves session token

echo $session; // will print session token

And then ... ?

Pass the session token you got here to your client (may be an app or browser), and login your client with it for using more features of Diuit Messaging API.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2016-03-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固