user management saas
DESCRIPTION
User Management, Saas with Stormpath, use case PHP SDKTRANSCRIPT
![Page 1: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/1.jpg)
User Management As a Service
Emmanuel IdéDevelopment Director at Quru
![Page 2: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/2.jpg)
Benefits of SaaS
• whittle away complexity to focus on core business logic
• lower initial cost
• Better maintainability
• Less reliance on server’s configuration
![Page 3: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/3.jpg)
Examples of SaaS
• SendGrid (Email)
• Stripe (Subscriptions, Payment)
• Twilio (Voice, SMS)
• Stormpath (User Management)
![Page 4: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/4.jpg)
Examples of User Management SaaS
• Stormpath
• Auth0
• Dailycred
• AuthRocket
![Page 5: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/5.jpg)
User Management Challenges
• Increasing complexity (e.g. social plugins)
• Security (e.g. PCI compliance)
• Availability
• Interoperability (third party or internal apps)
![Page 6: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/6.jpg)
User Management with Stormpath
• Login/Authentication• User Profiles• Roles• Permissions• Social Login• Active Directory/LDAP
![Page 7: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/7.jpg)
Examples of SaaS
• SendGrid (Email)
• Stripe (Subscriptions, Payment)
• Twilio (Voice, SMS)
• Stormpath (User Management)
![Page 8: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/8.jpg)
Stormpath
![Page 9: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/9.jpg)
Groups Architecture
• Directory: security policies, e.g. customers vs employees
• Group: collection of accounts, role based access control, e.g. Admin vs User
• Account: unique identity within the directory, e.g. [email protected]
![Page 10: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/10.jpg)
Stormpath PHP SDK
• Free
• Well documented
• Easy integration
• Limited functionalities (vs API)e.g.: custom profile information
![Page 11: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/11.jpg)
Stormpath
![Page 12: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/12.jpg)
Code: instanciate application
$apiKey = new \Stormpath\ApiKey('apiKeyId', 'apiKeySecret'); $client = new \Stormpath\Client($apiKey);
$href = 'https://api.stormpath.com/v1/applications/WpM9';$application = $client-> dataStore-> getResource($href, \
Stormpath\Stormpath::APPLICATION);
![Page 13: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/13.jpg)
Code: how to retrieve information
$href = 'https://api.stormpath.com/v1/directories/bckhc';$directory = $client-> dataStore-> getResource($href, \
Stormpath\Stormpath::DIRECTORY);
// directory groups$groups = $directory->groups;
// directory accounts$accounts = $directory->accounts;
![Page 14: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/14.jpg)
Code: Custom Data
THIS IS CURRENTLY NOT SUPPORT BY THE SDK
Core user data: • Username• Password• Email• Full Name• Given Name• Middle Name• Surname
![Page 15: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/15.jpg)
Code: useful methods// Registration$application->createAccount($account);// Confirm Email$account = $application->verifyAccountEmail($VERIFICATION_TOKEN);// Authentication$result = $application->authenticate('usernameOrEmail', 'password');$account = $result->account;// Send password reset request$account = $application-
>sendPasswordResetEmail('[email protected]');// Check password reset token$account = $application->verifyPasswordResetToken('$TOKEN');
![Page 16: User Management SaaS](https://reader036.vdocuments.us/reader036/viewer/2022081821/547c134db4af9fe62e8b45d6/html5/thumbnails/16.jpg)
Thanks
http://docs.stormpath.com/php/product-guide
Example of use: http://staging.gadashboards.com
Emmanuel Idé[email protected]