Skip to content

Commit b3a5572

Browse files
committed
Merge branch 'master' of git.authing.co:sdk/authing-php-sdk
2 parents 6b41497 + 7c8d375 commit b3a5572

6 files changed

+17
-252
lines changed

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,16 @@ $users = $management->users()->paginate();
4040

4141
## 使用认证模块
4242

43-
初始化 `AuthenticationClient` 需要 `userPoolId`(用户池 ID):
43+
初始化 `AuthenticationClient` 需要 `appId`(应用 ID):
4444

45-
> 你可以在此[了解如何获取 UserPoolId](https://docs.authing.cn/v2/guides/faqs/get-userpool-id-and-secret.html) .
45+
> 你可以在此[了解如何获取 AppId](/guides/faqs/get-app-id-and-secret.md) .
4646
4747
```php
4848
use Authing\Auth\AuthenticationClient;
4949

50-
$authentication = new AuthenticationClient("AUTHING_USERPOOL_ID");
50+
$authentication = new AuthenticationClient(function ($ops) {
51+
$ops->appId = "---";
52+
});
5153
```
5254

5355
接下来可以进行注册登录等操作:
@@ -56,7 +58,9 @@ $authentication = new AuthenticationClient("AUTHING_USERPOOL_ID");
5658
use Authing\Auth\AuthenticationClient;
5759
use Authing\Types\LoginByEmailInput;
5860

59-
$authentication = new AuthenticationClient("AUTHING_USERPOOL_ID");
61+
$authentication = new AuthenticationClient(function ($ops) {
62+
$ops->appId = "---";
63+
});
6064
$user = $authentication->loginByEmail(new LoginByEmailInput("test@example.com", "123456"));
6165
```
6266

@@ -67,7 +71,9 @@ use Authing\Auth\AuthenticationClient;
6771
use Authing\Types\LoginByEmailInput;
6872
use Authing\Types\UpdateUserInput;
6973

70-
$authentication = new AuthenticationClient("AUTHING_USERPOOL_ID");
74+
$authentication = new AuthenticationClient(function ($ops) {
75+
$ops->appId = "---";
76+
});
7177
$authentication->loginByEmail(new LoginByEmailInput("test@example.com", "123456"));
7278

7379
$user = $authentication->updateProfile((new UpdateUserInput())->withNickname("nickname"));
@@ -78,7 +84,9 @@ $user = $authentication->updateProfile((new UpdateUserInput())->withNickname("ni
7884
```php
7985
use Authing\Auth\AuthenticationClient;
8086

81-
$authentication = new AuthenticationClient("AUTHING_USERPOOL_ID");
87+
$authentication = new AuthenticationClient(function ($ops) {
88+
$ops->appId = "---";
89+
});
8290
$authentication->setAccessToken("ACCESS_TOKEN");
8391
```
8492

@@ -88,7 +96,9 @@ $authentication->setAccessToken("ACCESS_TOKEN");
8896
use Authing\Auth\AuthenticationClient;
8997
use Authing\Types\UpdateUserInput;
9098

91-
$authentication = new AuthenticationClient("AUTHING_USERPOOL_ID");
99+
$authentication = new AuthenticationClient(function ($ops) {
100+
$ops->appId = "---";
101+
});
92102
$authentication->setAccessToken("ACCESS_TOKEN");
93103

94104
$user = $authentication->updateProfile((new UpdateUserInput())->withNickname("nickname"));

testAclManagementClient.php

Lines changed: 0 additions & 26 deletions
This file was deleted.

testAuthenticationClient.php

Lines changed: 0 additions & 81 deletions
This file was deleted.

testGroupsManagementClient.php

Lines changed: 0 additions & 47 deletions
This file was deleted.

testRolesManagementClient.php

Lines changed: 0 additions & 47 deletions
This file was deleted.

testUsersManagementClient.php

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)