User Management As a Service 
Emmanuel Idé 
Development Director at Quru
Benefits of SaaS 
• whittle away complexity to focus on core 
business logic 
• lower initial cost 
• Better maintainability 
• Less reliance on server’s configuration
Examples of SaaS 
• SendGrid (Email) 
• Stripe (Subscriptions, Payment) 
• Twilio (Voice, SMS) 
• Stormpath (User Management)
Examples of User Management SaaS 
• Stormpath 
• Auth0 
• Dailycred 
• AuthRocket
User Management Challenges 
• Increasing complexity (e.g. social plugins) 
• Security (e.g. PCI compliance) 
• Availability 
• Interoperability (third party or internal apps)
User Management with Stormpath 
• Login/Authentication 
• User Profiles 
• Roles 
• Permissions 
• Social Login 
• Active Directory/LDAP
Examples of SaaS 
• SendGrid (Email) 
• Stripe (Subscriptions, Payment) 
• Twilio (Voice, SMS) 
• Stormpath (User Management)
Stormpath
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. emmanuel.ide@netleap.co.uk
Stormpath PHP SDK 
• Free 
• Well documented 
• Easy integration 
• Limited functionalities (vs API) 
e.g.: custom profile information
Stormpath
Code: instanciate application 
$apiKey = new StormpathApiKey('apiKeyId', 'apiKeySecret'); 
$client = new StormpathClient($apiKey); 
$href = 'https://api.stormpath.com/v1/applications/WpM9'; 
$application = $client-> dataStore-> getResource($href, 
StormpathStormpath::APPLICATION);
Code: how to retrieve information 
$href = 'https://api.stormpath.com/v1/directories/bckhc'; 
$directory = $client-> dataStore-> getResource($href, 
StormpathStormpath::DIRECTORY); 
// directory groups 
$groups = $directory->groups; 
// directory accounts 
$accounts = $directory->accounts;
Code: Custom Data 
THIS IS CURRENTLY NOT SUPPORT BY THE SDK 
Core user data: 
• Username 
• Password 
• Email 
• Full Name 
• Given Name 
• Middle Name 
• Surname
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('john.smith@example.com'); 
// Check password reset token 
$account = $application->verifyPasswordResetToken('$TOKEN');
Thanks 
http://docs.stormpath.com/php/product-guide 
Example of use: 
http://staging.gadashboards.com 
Emmanuel Idé 
emmanuel.ide@gmail.com 
07971455885

User Management SaaS

  • 1.
    User Management Asa Service Emmanuel Idé Development Director at Quru
  • 2.
    Benefits of SaaS • whittle away complexity to focus on core business logic • lower initial cost • Better maintainability • Less reliance on server’s configuration
  • 3.
    Examples of SaaS • SendGrid (Email) • Stripe (Subscriptions, Payment) • Twilio (Voice, SMS) • Stormpath (User Management)
  • 4.
    Examples of UserManagement SaaS • Stormpath • Auth0 • Dailycred • AuthRocket
  • 5.
    User Management Challenges • Increasing complexity (e.g. social plugins) • Security (e.g. PCI compliance) • Availability • Interoperability (third party or internal apps)
  • 6.
    User Management withStormpath • Login/Authentication • User Profiles • Roles • Permissions • Social Login • Active Directory/LDAP
  • 7.
    Examples of SaaS • SendGrid (Email) • Stripe (Subscriptions, Payment) • Twilio (Voice, SMS) • Stormpath (User Management)
  • 8.
  • 9.
    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. emmanuel.ide@netleap.co.uk
  • 10.
    Stormpath PHP SDK • Free • Well documented • Easy integration • Limited functionalities (vs API) e.g.: custom profile information
  • 11.
  • 12.
    Code: instanciate application $apiKey = new StormpathApiKey('apiKeyId', 'apiKeySecret'); $client = new StormpathClient($apiKey); $href = 'https://api.stormpath.com/v1/applications/WpM9'; $application = $client-> dataStore-> getResource($href, StormpathStormpath::APPLICATION);
  • 13.
    Code: how toretrieve information $href = 'https://api.stormpath.com/v1/directories/bckhc'; $directory = $client-> dataStore-> getResource($href, StormpathStormpath::DIRECTORY); // directory groups $groups = $directory->groups; // directory accounts $accounts = $directory->accounts;
  • 14.
    Code: Custom Data THIS IS CURRENTLY NOT SUPPORT BY THE SDK Core user data: • Username • Password • Email • Full Name • Given Name • Middle Name • Surname
  • 15.
    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('john.smith@example.com'); // Check password reset token $account = $application->verifyPasswordResetToken('$TOKEN');
  • 16.
    Thanks http://docs.stormpath.com/php/product-guide Exampleof use: http://staging.gadashboards.com Emmanuel Idé emmanuel.ide@gmail.com 07971455885