Logged In User By Id

Description

The loggedInUserById endpoint is used to fetch a user's details from the database during the login process. Depending on the response, the user could be prompted to change his password, enroll security questions, or perform other actions.

Request

Endpoint

/ui/v1/loggedInUserById/n

Note

Replace n above with the internal ID of the user.

Method

POST
Content-Type: application/json
Authorization: Basic $TOKEN

Note

Replace $TOKEN in the request with the base64-encoded username/password combination in the format username:password.

Given a username of username and a password of password, the request header would appear as follows:

Content-Type: application/json
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

Request Body

{}

Response

{
    "details": null,
    "authorities": [{
            "authority": "3"
        }, {
            "authority": "CUSTOMER_USER"
        }, {
            "authority": "applicationId:1"
        }, {
            "authority": "createdUserId:1"
        }, {
            "authority": "forceChangePasswordInd:false"
        }, {
            "authority": "lastLoginDateTime:2017-12-12 10:07 AM"
        }, {
            "authority": "locale:en_US"
        }, {
            "authority": "minimumPasswordLength:6"
        }, {
            "authority": "passwordExpiredInd:false"
        }, {
            "authority": "passwordExpiryDaysIn:-1"
        }, {
            "authority": "passwordHistoryCount:10"
        }, {
            "authority": "securityQuestionsEnrolledInd:true"
        }, {
            "authority": "userEmail:vela@datumsoftware.com"
        }, {
            "authority": "velaEnvironment:QA"
        }, {
            "authority": "loyaltyStatus:NOT_ENROLLED"
        }, {
            "authority": "loyaltyRewardsNumber:null"
        }, {
            "authority": "totalOutstandingPoints:0"
        }, {
            "authority": "forceChangeSecurityQuestionsInd:false"
        }, {
            "authority": "customerId:null"
        }, {
            "authority": "unpaidInvoiceCount:0"
        }
    ],
    "authenticated": true,
    "principal": "johnsmith",
    "credentials": "$2a$11$4JyR..xiRpnnuKs.cOpAO.FhANHI6Dj6H2W0paugIQ0XiClGf0sZK",
    "name": "johnsmith"
}