User Management SaaS

16
User Management As a Service Emmanuel Idé Development Director at Quru

description

User Management, Saas with Stormpath, use case PHP SDK

Transcript of User Management SaaS

Page 1: User Management SaaS

User Management As a Service

Emmanuel IdéDevelopment Director at Quru

Page 2: User Management SaaS

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

Examples of SaaS

• SendGrid (Email)

• Stripe (Subscriptions, Payment)

• Twilio (Voice, SMS)

• Stormpath (User Management)

Page 4: User Management SaaS

Examples of User Management SaaS

• Stormpath

• Auth0

• Dailycred

• AuthRocket

Page 5: User Management SaaS

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

User Management with Stormpath

• Login/Authentication• User Profiles• Roles• Permissions• Social Login• Active Directory/LDAP

Page 7: User Management SaaS

Examples of SaaS

• SendGrid (Email)

• Stripe (Subscriptions, Payment)

• Twilio (Voice, SMS)

• Stormpath (User Management)

Page 8: User Management SaaS

Stormpath

Page 9: User Management SaaS

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

Stormpath PHP SDK

• Free

• Well documented

• Easy integration

• Limited functionalities (vs API)e.g.: custom profile information

Page 11: User Management SaaS

Stormpath

Page 12: User Management SaaS

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

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

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

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

Thanks

http://docs.stormpath.com/php/product-guide

Example of use: http://staging.gadashboards.com

Emmanuel Idé[email protected]