Uploaded image for project: 'mod-users-bl'
  1. mod-users-bl
  2. MODUSERBL-6

Implement login endpoint for users-bl module

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • P3
    • Resolution: Done
    • None
    • 1.0.0

    Description

      We need to provide an endpoint that allows for a user to login with username and password credentials and obtain a JWT in return.

      In addition, we need to provide the user's own permissions info and the user's own userdata information.

      Example:

      Request:

      POST /users-bl/login
      { username: "diku_admin", password: "admin" }
      

      Response:

      201 Created
      {
        user: {
          "username" : "diku_admin",
          "id" : "1ad737b0-d847-11e6-bf26-cec0c932ce01",
          "active" : true,
          "patronGroup" : "0f722ab3-fdd5-4d5e-8d28-2fc699a05400",
          "personal" : {
            "lastName" : "ADMINISTRATOR",
            "firstName" : "DIKU",
            "email" : "diku@indexdata.com"
          }
        },
        perms: [
          {
            "permissionName" : "perms.all",
            "displayName" : "perms all",
            "id" : "93dec166-a427-4dc1-8da6-6f9510ee2774",
            "description" : "All permissions for the permissions module",
            "tags" : [ ],
            "subPermissions" : [ "perms.users", "perms.permissions" ],
            "mutable" : false,
            "visible" : false
          },
          // ...
        ]
      }
      

      Since the logging in user will have no permissions to supply, the module will need module permissions for the permissions and userdata lookups.

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                kurt Kurt Nordstrom
                kurt Kurt Nordstrom
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 day, 2 hours
                    1d 2h

                    TestRail: Runs

                      TestRail: Cases