承接 gooby/ez-auth-client 相关项目开发

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

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

gooby/ez-auth-client

最新稳定版本:v1.1.0

Composer 安装命令:

composer require gooby/ez-auth-client

包简介

Client for using the gooby/ez-auth-server to enable SSO across multiple sub domains with JWTs.

README 文档

README

Used along side a EZ Auth Server to allow SSO across multiple subdomains sharing a TLD using JWTs.

Installation

Use composer to manage your dependencies and download EZ Auth Client:

composer require gooby/ez-auth-client

Setup

We recommend adding these to your .env file, otherwise, you can pass these settings in the Auth constructor.

EZ_AUTH_CLIENT_SECRET="my-shared-secret-here"
EZ_AUTH_CLIENT_SERVER="https://auth.my-ez-auth-server.com"

Quick Start

<?php

$auth = new Gooby\EzAuthClient\Auth();
$user = $auth->getUserOrLogin();

echo "You're logged in and your ID is {$user->id}";

Example

<?php

use Gooby\EzAuthClient\Auth;
use Gooby\EzAuthClient\JwtDecodeException;

$client = new Auth();

try {

    $user = $client->getUser();

} catch (JwtDecodeException $e) {

    // Invalid token, or bad secret
    MyApp::logFailedLoginAttempt('Invalid Token: ' . $e->getMessage());

    // Redirect request to login page
    $client->login();
}

echo "You're logged in and your ID is {$user->id}";

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固