承接 attla/data-token 相关项目开发

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

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

attla/data-token

Composer 安装命令:

composer require attla/data-token

包简介

Turn everything into a token: randomized or predictable.

README 文档

README

License Latest Stable Version Total Downloads

🪅 Turn everything into a token: randomized or predictable.

Installation

composer require attla/data-token

Usage

Creating and managing a token

use Attla\DataToken\Facade as DataToken;

// Create with facade
$token = DataToken::secrete('your secret phrase');

// Set the issuer claim
$token->iss();

// Set the expiration in minutes
$token->exp(120);

// Set payload of the token
$token->payload($model);

// Set the browser identifier on token
$token->bwr();

// Set user IP on the token
$token->ip();

// Get the token
$tokenEncoded = $token->encode();

Decoding the token

// Get token value as associative array
$tokenValue = DataToken::decode($tokenEncoded, true);

// Aliases for decode a token
$tokenValue = DataToken::fromString($tokenEncoded);
$tokenValue = DataToken::parseString($tokenEncoded);
$tokenValue = DataToken::parse($tokenEncoded);

Others ways to make a token

// Make a unique token from anything
$id = DataToken::id(123);

// Make always the same token
$sid = DataToken::sid(123);

// Make a strong token
$sign = DataToken::sign(123);

List of message methods

License

This package is licensed under the MIT license © Octha.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-07-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固