Details

    • Type: Sub-task
    • Status: Done
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Company:
      All Clients/Multiple Clients

      Description

      1. Store bearer token in session storage.
      2. Pass token on each subsequent request after login - Write generic logic for passsing token with each request.
      Token example :
      Authorization : Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
      3. Destroy token on Signout

        Attachments

          Activity

          Hide
          narendra.kumar Narendra Kumar added a comment -

          Hi Samir and Swapnil Pandhare,

          Is login API ready? If yes, Please share the details with me, so that I can fetch the token and other data from API.

           

          CC - Ramya TantryNandkumar Prabhakar Karlekar

          Show
          narendra.kumar Narendra Kumar added a comment - Hi Samir and Swapnil Pandhare , Is login API ready? If yes, Please share the details with me, so that I can fetch the token and other data from API.   CC - Ramya Tantry ,  Nandkumar Prabhakar Karlekar
          Hide
          ramya.tantry Ramya Tantry (Inactive) added a comment -

          Hi Narendra Kumar,

          The Login API is not yet ready, but here is the sample response that one would get based on username/ password.

          { "id": 1, "userName": test, "password": test, "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6IjEiLCJuYmYiOjE1NDUwMzg0ODcsImV4cCI6MTU0NTY0MzI4NywiaWF0IjoxNTQ1MDM4NDg3fQ.XB1EZCUUfGaI23pE27sEiBU29UoAhO_ZSBC1q1OPAWg" }

          You can use this sample data as of now.

          CC: Swapnil Pandhare,Nandkumar Prabhakar Karlekar,Samir

          Show
          ramya.tantry Ramya Tantry (Inactive) added a comment - Hi Narendra Kumar , The Login API is not yet ready, but here is the sample response that one would get based on username/ password. { "id": 1, "userName": test, "password": test, "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6IjEiLCJuYmYiOjE1NDUwMzg0ODcsImV4cCI6MTU0NTY0MzI4NywiaWF0IjoxNTQ1MDM4NDg3fQ.XB1EZCUUfGaI23pE27sEiBU29UoAhO_ZSBC1q1OPAWg" } You can use this sample data as of now. CC: Swapnil Pandhare , Nandkumar Prabhakar Karlekar , Samir
          Hide
          narendra.kumar Narendra Kumar added a comment -

          HI Ramya Tantry,

          Here token not containing 'Bearer'. But the token which Swapnil Pandhare mentioned in description contains Bearer. So tell me what to do? Should I need to add it to my side when sending it into the header?

           

          cc - Samir

          Show
          narendra.kumar Narendra Kumar added a comment - HI Ramya Tantry , Here token not containing 'Bearer'. But the token which Swapnil Pandhare mentioned in description contains Bearer. So tell me what to do? Should I need to add it to my side when sending it into the header?   cc - Samir
          Hide
          ramya.tantry Ramya Tantry (Inactive) added a comment -

          Hi Narendra Kumar,

          As of now, do not add Bearer. Please proceed with the sample response given by me. 

          We will discuss this with Swapnil in tomorrow's call.

          CC: Swapnil Pandhare,Samir

          Show
          ramya.tantry Ramya Tantry (Inactive) added a comment - Hi Narendra Kumar , As of now, do not add Bearer. Please proceed with the sample response given by me.  We will discuss this with Swapnil in tomorrow's call. CC: Swapnil Pandhare , Samir
          Hide
          narendra.kumar Narendra Kumar added a comment -

          Hi Samir and Swapnil Pandhare,

          I'm done with the following.

          1. Merged the changes of FormsLibrary Page into develop branch.
          2. Implemented Logic to fetch the token from API and Store into Session.
          3. Implemented Logic to destroy token at the time of logout.

          Based on the discussion I'm using Session Storage of the browser for storing user data. 

          Show
          narendra.kumar Narendra Kumar added a comment - Hi Samir and Swapnil Pandhare , I'm done with the following. Merged the changes of FormsLibrary Page into develop branch. Implemented Logic to fetch the token from API and Store into Session. Implemented Logic to destroy token at the time of logout. Based on the discussion I'm using Session Storage of the browser for storing user data. 
          Hide
          narendra.kumar Narendra Kumar added a comment -

          Hi Samir,

          I'm done with everything in this task. Like

          1. Implemented Http interceptor which will add the token in every outgoing request.
          2. Implemented encryption and decryption method. So that at the time of storing data into browser session It could be encrypted and when the user needs it, he could be able to decrypt data.

          The code has been pushed into DMS-280 branch.

          Show
          narendra.kumar Narendra Kumar added a comment - Hi Samir , I'm done with everything in this task. Like Implemented Http interceptor which will add the token in every outgoing request. Implemented encryption and decryption method. So that at the time of storing data into browser session It could be encrypted and when the user needs it, he could be able to decrypt data. The code has been pushed into DMS-280 branch.
          Hide
          narendra.kumar Narendra Kumar added a comment -

          HI Samir and Swapnil Pandhare

          I have merged this branch i.e. DMS-280 into develop. Please check.

           

          cc: Ramya Tantry

          Show
          narendra.kumar Narendra Kumar added a comment - HI Samir and Swapnil Pandhare I have merged this branch i.e. DMS-280 into develop . Please check.   cc: Ramya Tantry
          Hide
          ramya.tantry Ramya Tantry (Inactive) added a comment -

          Hi Narendra Kumar,

          The Sign in Post API is ready.

          This will be pushed to Dev Servers tomorrow. Meanwhile, as per discussion with Swapnil, merge the code at your end and test after the code is deployed tomorrow.

          API URL [POST]: http://localhost:64597/Users/auth

          Parameters to send : 

          { "userName" : "DMSUSER", "Password" : "Password@321" }

          After login, redirect to Review and sign page.

          Sample responses:

          The sample response for Success :

          { "id": 1, "userName": "DMSUSER", "password": null, "token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6IjEiLCJuYmYiOjE1NDUxMzgzNzQsImV4cCI6MTU0NTc0MzE3NCwiaWF0IjoxNTQ1MTM4Mzc0fQ.3wCbVdcp0SHyNMHbG559dPNZda4e5qSDWODNAJ0Pp7E", "firstName": "DMSUserFirstname", "lastName": "DMSLastname" }

          Sample response for User not found:

          { "status": "error", "message": "User does not exists.", "errorLevel": "Error", "code": 404, "description": "User does not exists." }

          Sample response for incorrect details :

          { "status": "error", "message": "Username or password is incorrect", "errorLevel": "Error", "code": 404, "description": "Username or password is incorrect" }

          CC: Swapnil Pandhare

          Show
          ramya.tantry Ramya Tantry (Inactive) added a comment - Hi Narendra Kumar , The Sign in Post API is ready. This will be pushed to Dev Servers tomorrow. Meanwhile, as per discussion with Swapnil, merge the code at your end and test after the code is deployed tomorrow. API URL   [POST] : http://localhost:64597/Users/auth Parameters to send  :  { "userName" : "DMSUSER", "Password" : "Password@321" } After login, redirect to Review and sign page. Sample responses: The sample response for Success : { "id": 1, "userName": "DMSUSER", "password": null, "token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6IjEiLCJuYmYiOjE1NDUxMzgzNzQsImV4cCI6MTU0NTc0MzE3NCwiaWF0IjoxNTQ1MTM4Mzc0fQ.3wCbVdcp0SHyNMHbG559dPNZda4e5qSDWODNAJ0Pp7E", "firstName": "DMSUserFirstname", "lastName": "DMSLastname" } Sample response  for User not found: { "status": "error", "message": "User does not exists.", "errorLevel": "Error", "code": 404, "description": "User does not exists." } Sample response  for incorrect details : { "status": "error", "message": "Username or password is incorrect", "errorLevel": "Error", "code": 404, "description": "Username or password is incorrect" } CC: Swapnil Pandhare
          Hide
          jayshree.nagpure Jayshree Nagpure (Inactive) added a comment -

          As we are not able test this jira through UI.
          Hence skipping the testing and marking as done.

          Thanks,
          Jayshree

          cc - Priya Dhamande

          Show
          jayshree.nagpure Jayshree Nagpure (Inactive) added a comment - As we are not able test this jira through UI. Hence skipping the testing and marking as done. Thanks, Jayshree cc - Priya Dhamande

            People

            Assignee:
            jayshree.nagpure Jayshree Nagpure (Inactive)
            Reporter:
            swapnil.pandhare Swapnil Pandhare (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 16h
                16h
                Remaining:
                Remaining Estimate - 16h
                16h
                Logged:
                Time Spent - Not Specified
                Not Specified