承接 submtd/laravel-api-token 相关项目开发

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

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

submtd/laravel-api-token

Composer 安装命令:

composer require submtd/laravel-api-token

包简介

API authentication with short lived tokens

README 文档

README

This package allows you to use short lived API tokens to protect endpoints.

Installation

First, pull the package in via composer.

composer require submtd/laravel-api-token

Second, run the database migrations.

php artisan migrate

Configuration

This package reads values from the .env file in order to control the length of the tokens and the expiration time.

// .env
API_TOKEN_LENGTH=128
API_REFRESH_LENGTH=256
API_TOKEN_EXPIRATION_MINUTES=1440
API_REFRESH_EXPIRATION_MINUTES=10080
API_USER_MODEL=\App\User

Endpoints

This package provides several endpoints to manage api tokens.

Public Endpoints

POST: /api/v1/token/login

This endpoint accepts email and password and returns a new API token.

POST: /api/v1/token/refresh

This endpoints accepts a refresh_token parameter and returns a refreshed API token.

Protected Endpoints

The following endpoints require a valid API token for access.

GET: /api/v1/token

This endpoint lists all user tokens.

GET: /api/v1/token/{uuid}

This endpoint shows a specific API token.

DELETE: /api/v1/token/{uuid}

This endpoint destroys a specific API token.

POST: /api/v1/token/create

This endpoint creates a new API token. An optional name parameter can be provided to name the token.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2020-06-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固