Skip to content

The user manager library handling user/password or OpenID / OAuth single signons

Notifications You must be signed in to change notification settings

convertigo/c8oprj-lib-user-manager

Repository files navigation

lib_UserManager

User management and Authentication for your projects

The lib_UserManager enables your projects to include user management and authentication in your apps. This library will handle :

  • user login with user/password using a salted password security
  • user login using OpenID (Google, Azure & linkedin)

When using user/password, the library will use the lib_usermanager_fullsync database to store userids and salted/hashed password

Symbols :

symbol Usage
lib_UserManager.adminPassword.secret LDAP admin account password
lib_UserManager.adminUser LDAP admin account user
lib_UserManager.ldapBasePath LDAP Search Root Path
lib_UserManager.ldapDomainName LDAP DOMAIN Name
lib_UserManager.ldapServer LDAP server address:port
lib_UserManager.smtp.server SMTP server address
lib_UserManager.smtp.port SMTP server port
lib_UserManager.smtp.sauthtype SMTP server authentication type
lib_UserManager.smtp.sender SMTP sender mail address
lib_UserManager.smtp.user SMTP server user account
lib_UserManager.smtp.password.secret SMTP server password

For more technical informations : documentation

Installation

  1. In your Convertigo Studio use File->Import->Convertigo->Convertigo Project and hit the Next button

  2. In the dialog Project remote URL field, paste the text below:

    UsageClick the copy button
    To contribute
    lib_UserManager=https://github.com/convertigo/c8oprj-lib-user-manager.git:branch=8.0.X
    
    To simply use
    lib_UserManager=https://github.com/convertigo/c8oprj-lib-user-manager/archive/8.0.X.zip
    
  3. Click the Finish button. This will automatically import the lib_UserManager project

Sequences

AddUser

Adds an user to the Internal Convertigo User database

variables

namecomment
askForPasswordResetThe user id as a valid email address
emailBodyEmail content
emailLogoEmail logo to be added
emailSubjectEmail subject
passwordThe inital password. (User will be able to change it afterwards)
targetApplicationNameEmail where to send the reset password link to
userThe user id as a valid email address

ConfirmAccount

Confirms a user account if a passwordResetKey was provided, or sends an email to the user with a passwordResetKey and allow him to confirm account. It should be called by CreateAccount sequence.

variables

namecomment
emailEmail where to send the reset password link to
emailLogoEmail logo to be added
emailSubjectEmail subject
langThe lang to be used in the email. It can be fr or en
passwordResetKeyPassword reset key (Optional)
targetApplicationNameThe Target application name to be used into the email template

CreateAccount

Creates a user account and sends validation email, to active this account

variables

namecomment
emailLogoEmail logo to be added
emailSubjectEmail subject
langThe language to be used into the email. Can be fr or en.
passwordThe inital password. (User will be able to change it afterwards)
targetApplicationNametarget Application Name
userThe user id as a valid email address

DeleteUser

Deletes an user from the internal Convertigo database

variables

namecomment
userThe user ID as (The users email address)

ForgotPassword

Has to be called with email fields not empty to send an email reset link to the user, or with a newPassword an passwordResetKey not empty to excplicitly reset a password

variables

namecomment
emailEmail where to send the reset password link to
emailBodyEmail content
emailLogoEmail logo to be added
emailSubjectEmail subject
newPasswordNew password to be set
passwordResetKeyPassword reset key
targetApplicationNameEmail where to send the reset password link to

ForgotPasswordWithBrand

Has to be called with email fields not empty to send an email reset link to the user, or with a newPassword an passwordResetKey not empty to excplicitly reset a password

variables

namecomment
emailEmail where to send the reset password link to
emailLogoEmail logo to be added
emailSubjectEmail subject
langThe lang to be used in the email. It can be fr or en
newPasswordNew password to be set
passwordResetKeyPassword reset key
targetApplicationNameThe Target application name to be used into the email template

GetUAllserAttributes

Gets a given attribute from an user account

variables

namecomment
attributeThe attribute name
userThe user where we have to get the attribute from

GetUserAttribute

Gets a given attribute from an user account

variables

namecomment
attributeThe attribute name
userThe user where we have to get the attribute from

GetUserByAttributeNameAndValue

Gets an user by attribute name and value

variables

namecomment
attrName
attrValue

HashAndSalt

Utility sequence to Hash and Salt passwords

variables

namecomment
hash
password
salt

ListUsers

Lists users from the internal Convertigo User database

ModifyPassword

Modify a password for a given user

variables

namecomment
passwordNew password to be set
userUser email to set the new password on

SetUserAttribute

Sets a given attribute on an user account if the account doesn't exists, an account will be created with a fake radom password

variables

namecomment
attributeThe attribute name
userThe user where we have to set the attribute on
valueThe attribute value

SignIn

Performs a user sign in for a given user with its id (email) and password

variables

namecomment
passwordThe user's password
userThe userID (user's email)

SignInAD

Sign in using an ActiveDirectory account. Will also return the list of groups the user belongs to

variables

namecomment
adminPasswordThe Active Directory admin account password. If not provided or invalid, the group membership information will not be provided.
adminUserA valid ActiveDirectory Admin Account with read privileges used to search for the user attributes. If this is not provided, the group membership information will not be returned.
domainNameUser
ldapBasePathThe active directory user user to sign in. May be a valid domain account ex: 'DOMAIN\user' or the user's email ex: '[email protected]' or just the users full name ex: 'John doe'
ldapServerThe Active Directory server ldap url as ldap(s)://server:port. Mandatory.
passwordThe users password
userThe active directory user user to sign in. May be a valid domain account ex: 'DOMAIN\user' or the user's email ex: '[email protected]' or just the users full name ex: 'John doe'

SignInADBulk

Sign in using an ActiveDirectory account. Will also return the list of groups the user belongs to

variables

namecomment
adminPasswordThe Active Directory admin account password. If not provided or invalid, the group membership information will not be provided.
adminUserA valid ActiveDirectory Admin Account with read privileges used to search for the user attributes. If this is not provided, the group membership information will not be returned.
domainNameUser
ldapBasePathThe active directory user user to sign in. May be a valid domain account ex: 'DOMAIN\user' or the user's email ex: '[email protected]' or just the users full name ex: 'John doe'
ldapServerThe Active Directory server ldap url as ldap(s)://server:port. Mandatory.
passwordThe users password
userThe active directory user user to sign in. May be a valid domain account ex: 'DOMAIN\user' or the user's email ex: '[email protected]' or just the users full name ex: 'John doe'

SignInAdPostGroups