承接 yasuaki640/cognito-srp-php 相关项目开发

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

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

yasuaki640/cognito-srp-php

Composer 安装命令:

composer require yasuaki640/cognito-srp-php

包简介

Helper written by PHP to get through SRP authentication for Amazon Cognito.

README 文档

README

Helper written by PHP to get through SRP authentication for Amazon Cognito.

This was written in reference to the jenky/AwsCognitoIdentitySRP.php.

Install

composer require yasuaki640/cognito-srp-php

Usage

    // instantiate aws client
    $client = new CognitoIdentityProviderClient([
        ...
    ]);

    // instantiate helper
    $srpHelper = new CognitoSrp(
        'your client id',
        'your pool id',
        'your client secret (required)',
    );
    
    $result = $client->adminInitiateAuth([
        'AuthFlow' => 'USER_SRP_AUTH',
        'ClientId' => 'your client id',
        'UserPoolId' => 'your pool id',
        'AuthParameters' => [
            'USERNAME' => $username,
             // calculate A
            'SRP_A' => $srpHelper->SRP_A(),
             // calculate secret Hash
            'SECRET_HASH' => $srpHelper->SECRET_HASH($username),
        ],
    ]);

    $authRes = $client->adminRespondToAuthChallenge([
        'ChallengeName' => 'PASSWORD_VERIFIER',
        'UserPoolId' => 'your pool id',
        'ClientId' => 'your client id',
        // generate authentication challenge response params
        'ChallengeResponses' => $srpHelper->ChallengeResponses($result, $password), 
    ]);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-10-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固