Skip to content
This repository was archived by the owner on Oct 30, 2023. It is now read-only.

Repository files navigation

FlowzAuthentication


Build Status

Authentication, Ldap and User Services

Getting started

Take clone of project and execute following commands

$ cd FlowzAuthentication/auth
$ npm install
$ cd FlowzAuthentication/ldap
$ npm install
$ cd FlowzAuthentication/user
$ npm install

url endpoints:

Authentication Services : http://auth.flowz.com

Ldap Login : http://auth.flowz.com/api/ldapauth

Ldap Services: http://api.flowz.com/authldap

User Services : http://api.flowz.com/user

Authentication Services


login

  • post

    http://auth.flowz.com/api/login
    
  • json body:

    {
    "email":"provide email id",
    "password":"provide password"
    } 

signup

  • post

    http://auth.flowz.com/api/setup
    
  • json body:

    {
    "email":"email id",
    "password":"password",
    "username":"username",
    "aboutme":"aboutme",
    "fullname":"fullname",
    "firstname":"firstname",
    "middlename":"middlename",
    "lastname":"lastname",
    "address1":"address1",
    "address2":"address2",
    "dob":"birthdate",
    "country":"country",
    "state":"state",
    "city":"city",
    "zipcode":"zipcode",
    "phonenumber":"phonenumber",
    "fax":"fax",
    "role":"role",
    "signup_type":"signup_type",
    "image_name":"image_name",
    "image_url":"image_url"
    } 
  • note: use above field as per your convenient.

change password

  • post

    http://auth.flowz.com/api/changepassword
    
  • json body:

    {
    "oldpass":"your old password",
    "newpass":"your new password"
    } 

forget password

  • post

    http://auth.flowz.com/api/forgetpassword
    
  • json body:

    {
    "email":"your email id",
    "url":"your redirect url (ex. http://www.example.com)"
    } 

reset password

  • post

    http://auth.flowz.com/api/resetpassword
    
  • json body:

    {
    "new_password":"provide your new password",
    "token":"provide your forget token"
    } 

userdetails

  • get

    http://auth.flowz.com/api/userdetails
    
  • Headers:

    Authorization: provide logintoken

social login


About

we are providing social login services like (google,facebook,twitter,github,linkedin) . users can use this services by request paticular login service url with request parameter as success_url.after succesfully authenticated user can verify through email id when user first time redirect to success_url page and after succesfully verfied user logged in for particular project.

  • social login flow

    step:1 user can select social media platform to login with.

    step:2 after succesfully authenticated user redirected to succesful_url page and ob_id padded to url.

    step:3 after user verify through email id on success_url page.

    step:4 verified user succesfully logged in with your particular project and get logintoken.

google

  • generate client id and client secret

    https://console.developers.google.com

  • post

    http://auth.flowz.com/auth/Gplus
    
  • pass success_url with request

    <form id="" name="" action="" method="post">
    <input type="hidden" name="success_url" value="your success_url">
    </form>
    

facebook

  • generate client id and client secret

    https://developers.facebook.com/

  • post

    http://auth.flowz.com/auth/facebook
    
  • pass success_url with request

    <form id="" name="" action="" method="post">
    <input type="hidden" name="success_url" value="your success_url">
    </form>
    

twitter

  • generate client id and client secret

    https://developer.twitter.com/

  • post

    http://auth.flowz.com/auth/twitter
    
  • pass success_url with request

    <form id="" name="" action="" method="post">
    <input type="hidden" name="success_url" value="your success_url">
    </form>
    

linkedin

  • generate client id and client secret

    https://developer.linkedin.com/

  • post

    http://auth.flowz.com/auth/linkedin
    
  • pass success_url with request

    <form id="" name="" action="" method="post">
    <input type="hidden" name="success_url" value="your success_url">
    </form>
    

github

  • generate client id and client secret

    https://github.com/settings/developers

  • post

    http://auth.flowz.com/auth/github
    
  • pass success_url with request

    <form id="" name="" action="" method="post">
    <input type="hidden" name="success_url" value="your success_url">
    </form>
    

User Services


alluserdetails

  • get

    http://api.flowz.com/user/alluserdetails
    
  • Headers:

    Authorization: provide logintoken

getuserdetails

  • get

     http://api.flowz.com/user/getuserdetails/:uid
    
  • Headers:

    Authorization: provide logintoken

  • params:

    uid: object_id

updateuserdetails

  • put

     http://api.flowz.com/user/updateuserdetails/:uid
    
  • Headers:

    Authorization: provide logintoken

  • params:

    uid: object_id

  • json body

    {
    "provide your updation field"
    }

deleteuserdetails

  • delete

     http://api.flowz.com/user/deleteuserdetails/:uid
    
  • Headers:

    Authorization: provide logintoken

  • params:

    uid: object_id

Ldap Services


About

LDAP (Lightweight Directory Access Protocol) is a software protocol for enabling anyone to locate organizations, individuals, and other resources such as files and devices in a network, whether on the public Internet or on a corporate intranet.

An LDAP directory is organized in a simple "tree" hierarchy consisting of the following levels:

  • The root directory (the starting place or the source of the tree), which branches out to
  • Countries, each of which branches out to
  • Organizations, which branch out to
  • Organizational units (divisions, departments, and so forth), which branches out to (includes an entry for)
  • Individuals (which includes people, files, and shared resources such as printers)

login

  • post

     http://auth.flowz.com/api/ldapauth
    
  • json body

    {
    "email":"email id",
    "password":"password"
    }

init

  • post

     http://api.flowz.com/authldap/init
    
  • json body

    {
    "app":"appname"
    }

userslist

  • get

     http://api.flowz.com/authldap/userslist/:role 
  • params

    "role":"rolename"

useradd

  • post

     http://api.flowz.com/authldap/useradd
    
  • json body

    {
    "cn":"common name",
    "sn": "surname",
    "gidNumber": "group idNumber",
    "givenname": "givenname",
    "mail": "email id",
    "uid": "user id",
    "uidNumber": "user idNumber",
    "userpassword": "userpassword"
    }

addroles

  • post

     http://api.flowz.com/authldap/addRoles
    
  • json body

    {
    "groupname":"groupname",
    "um":"unique member Dn",
    "owner":"owner Dn"
    }

getroles

  • get

     http://api.flowz.com/authldap/getroles
    

setpermission

  • post

     http://api.flowz.com/authldap/setpermission
    
  • json body

    {
    "resourceId": "resource id" ,
    "roleId": "role id " ,
    "taskType": "tasktype",
    "accessValue": "access value",
    "app":"appname"
    }

getpermission

  • get

     http://api.flowz.com/authldap/getpermission/:app/:taskType/:roleId/:resourceId 
  • params

    "app":"appname"

    "taskType":"taskType"

    "roleId":"roleId"

    "resourceId":"resourceId"

getallpermission

  • get

     http://api.flowz.com/authldap/getallpermission/:app
    
  • params

    "app":"appname"

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages