承接 latvijas-talrunis/api-auth-client-maker 相关项目开发

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

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

latvijas-talrunis/api-auth-client-maker

Composer 安装命令:

composer require latvijas-talrunis/api-auth-client-maker

包简介

An API Client Maker For Specific Purpose

README 文档

README

from LT/Utils

How to set up in symfony:

  1. Install with
    composer require latvijas-talrunis/api-auth-client-maker

In the case of your project not being able to find the ClientMaker. This might help:

    composer dump-autoload
  1. Update your project's
services:
    LT\Utils\ApiClientMaker\ClientMaker:
        arguments:
            $authServiceUrl: '%env(string:AUTH_SERVICE_URL)%'
            $authServiceUser: '%env(string:AUTH_SERVICE_USER)%'
            $authServicePassword: '%env(string:AUTH_SERVICE_PASSWORD)%'
  1. Update your .env file with these 3 variables
    AUTH_SERVICE_URL=http://url.to.the.auth.service
    AUTH_SERVICE_USER=root
    AUTH_SERVICE_PASSWORD=
  1. And for the controller:

It needs a class property in which to keep the instantiated ClientMaker

    public $clientMaker;

It needs to be set up in the clients constructor

    public function __construct(ApiClientMaker $serviceMediatorClientMaker){
    $this->clientMaker = $serviceMediatorClientMaker;
    }

And then it will be available in every method of this particular controller

    #[Route('/test')]
    public function index(): Response
    {
    // authorized symfony http client
    $client = $this->clientMaker->getClient();
    }

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固