承接 dvsa/authentication-cognito 相关项目开发

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

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

dvsa/authentication-cognito

最新稳定版本:v3.2.0

Composer 安装命令:

composer require dvsa/authentication-cognito

包简介

A wrapper around the AWS SDK (Cognito)

README 文档

README

A thin authentication wrapper around the aws-sdk, focusing on the Cognito endpoints.

Installing

The recommended way to install is through Composer.

composer require dvsa/authentication-cognito

Usage

<?php

use Aws\CognitoIdentityProvider\CognitoIdentityProviderClient;
use Aws\Credentials\Credentials;
use Dvsa\Authentication\Cognito\Client;

# Variables below must be replaced by their respective values.
$accessKey = 'AWS_ACCESS_KEY';
$secret = 'AWS_SECRET';

$clientId = 'CLIENT_ID';
$clientSecret = 'CLIENT_SECRET';
$poolId = 'POOL_ID';

# https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.Credentials.Credentials.html#___construct
$awsCredentials = new Credentials($accessKey, $secret);

# https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.AwsClient.html#___construct
$awsClient = new CognitoIdentityProviderClient([
    'credentials' => $awsCredentials,
    'version' => '2016-04-18',
    'region' => 'eu-west-2'
]);

return new Client(
    $awsClient,
    $clientId,
    $clientSecret,
    $poolId
);

Contributing

Please refer to our Contribution Guide and Contributor Code of Conduct.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 7
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-06-02