PHPackages                             phuocdaivl/sts-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. phuocdaivl/sts-sdk

ActiveLibrary

phuocdaivl/sts-sdk
==================

User management and Brand tenant

1.0.7(6y ago)03511MITPHP

Since Sep 5Pushed 6y ago1 watchersCompare

[ Source](https://github.com/phuocdaivl/sts-sdk)[ Packagist](https://packagist.org/packages/phuocdaivl/sts-sdk)[ RSS](/packages/phuocdaivl-sts-sdk/feed)WikiDiscussions master Synced yesterday

READMEChangelog (8)Dependencies (1)Versions (9)Used By (0)

DaiDP STS SDK
=============

[](#daidp-sts-sdk)

User management and Brand tenant

[![Latest Version on Packagist](https://camo.githubusercontent.com/5bf0d61c84b18c2e25ac75a05031232a674992f7c59321f02b2da7dd6ce4e00d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068756f63646169766c2f7374732d73646b3f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phuocdaivl/sts-sdk)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Build Status](https://camo.githubusercontent.com/8eb7f7a3b591eabc2dde71a70d506ba875477d29a092efc77de12b136783ff90/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7068756f63646169766c2f7374732d73646b2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/phuocdaivl/sts-sdk)[![Total Downloads](https://camo.githubusercontent.com/9fc0340f0bde8feab051260260b37e2163573ec7e303975af75671f2552aa029/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068756f63646169766c2f7374732d73646b2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phuocdaivl/sts-sdk)

Download &amp; Install
----------------------

[](#download--install)

```
composer require phuocdaivl/sts-sdk
```

Add service provider
--------------------

[](#add-service-provider)

Add the service provider to the providers array in the `config/app.php` config file as follows:

```
'providers' => [

    ...

    DaiDP\StsSDK\Providers\StsServiceProvider::class,
]
```

Well done.

User management
---------------

[](#user-management)

Basic use:

```
$umSDK = app()->get(\DaiDP\StsSDK\UserManagement\UserManagementInterface::class);
```

### Methods

[](#methods)

The following methods are available on the UserManagement instance.

#### register()

[](#register)

Create new account

```
$data = [
    'username' => '0766808284',
    'fullname' => 'Phước Đại',
    'email'    => '0766808284@gmail.com',
    'password' => '12345678',
    'confirmpassword' => '12345678'
];
$result = $umSDK->register($data);
```

#### resetPassword()

[](#resetpassword)

Set new password for account

```
$phone    = '0766808284';
$password = 'abc123ABC';
$result   = $umSDK->resetPassword($phone, $password);
```

Tenant management
-----------------

[](#tenant-management)

Basic use:

```
$tmSDK = app()->get(\DaiDP\StsSDK\TenantManagement\TenantManagementInterface::class);
```

### Methods

[](#methods-1)

The following methods are available on the TenantManagement instance.

#### createTenant()

[](#createtenant)

Create new database tenant

```
$name = 'tenant001';
$result = $tmSDK->createTenant($name);
```

#### createConnectionString()

[](#createconnectionstring)

Create new database connection of tenant

```
$idTenant = 'f06e16bc-1035-4de3-93cc-96bdd21da4a5';
$connectionString = 'Server=localhost;port=3306;Database=tenant_01;user=root;password=';
$result = $tmSDK->createConnectionString($idTenant, $connectionString);
```

#### getConnectionStrings()

[](#getconnectionstrings)

Get database connection string list

```
$serviceName = 'RetailProBrand';
$result = $tmSDK->getConnectionStrings($serviceName);
```

System user management
----------------------

[](#system-user-management)

Basic use:

```
$sysuSDK = app()->get(\DaiDP\StsSDK\SystemUserManagement\SystemUserManagementInterface::class);
```

### Methods

[](#methods-2)

The following methods are available on the SystemUserManagement instance.

#### register()

[](#register-1)

Create new account

```
$data = [
    'email'    => 'admin001@gmail.com',
    'fullname' => 'Phước Đại',
    'password' => '12345678',
    'confirmpassword' => '12345678'
];
$result = $sysuSDK->register($data);
```

#### resetPassword()

[](#resetpassword-1)

Set new password for account

```
$email    = 'admin001@gmail.com';
$password = 'abc123ABC';
$result   = $sysuSDK->resetPassword($email, $password);
```

#### changePassword()

[](#changepassword)

Change account password

```
$email       = 'admin001@gmail.com';
$oldPassword = '12345678';
$newPassword = 'abc123ABC';
$result      = $sysuSDK->changePassword($email, $oldPassword, $newPassword);
```

Tenant user management
----------------------

[](#tenant-user-management)

Basic use:

```
$tumSDK = app()->get(\DaiDP\StsSDK\TenantUserManagement\TenantUserManagementInterface::class);
$tumSDK->setTenantId('f06e16bc-1035-4de3-93cc-96bdd21da4a5'); // required
```

### Methods

[](#methods-3)

The following methods are available on the TenantUserManagement instance.

#### register()

[](#register-2)

Create new account

```
$data = [
    'username' => 'usertn001',
    'email'    => 'usertn001@gmail.com',
    'fullname' => 'Phước Đại',
    'password' => '12345678',
    'confirmpassword' => '12345678'
];
$result = $tumSDK->register($data);
```

#### resetPassword()

[](#resetpassword-2)

Set new password for account

```
$username = 'usertn001';
$password = 'abc123ABC';
$result   = $tumSDK->resetPassword($username, $password);
```

#### changePassword()

[](#changepassword-1)

Change account password

```
$username    = 'usertn001';
$oldPassword = '12345678';
$newPassword = 'abc123ABC';
$result      = $tumSDK->changePassword($username, $oldPassword, $newPassword);
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 82.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

8

Last Release

2424d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bafc7180e5bde3b20ffea5898803405253992037e40089539b57e11833fda711?d=identicon)[phuocdaivl](/maintainers/phuocdaivl)

---

Top Contributors

[![phuocdaivl](https://avatars.githubusercontent.com/u/38450145?v=4)](https://github.com/phuocdaivl "phuocdaivl (23 commits)")[![ducvu91](https://avatars.githubusercontent.com/u/19793530?v=4)](https://github.com/ducvu91 "ducvu91 (5 commits)")

### Embed Badge

![Health badge](/badges/phuocdaivl-sts-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/phuocdaivl-sts-sdk/health.svg)](https://phpackages.com/packages/phuocdaivl-sts-sdk)
```

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
