#1343 Simplify login response format
Closed: Fixed None Opened 9 years ago by edewata.

Currently the AccountService.login() will return the account information in the following XML format:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Account id="testuser">
    <Email>testuser@example.com</Email>
    <FullName>Test User</FullName>
    <Roles>
        <entries>admin</entries>
        <entries>agent</entries>
    </Roles>
</Account>

and JSON format:

{
    "id": "tpsadmin",
    "FullName": "tpsadmin",
    "Email": "tpsadmin@example.com",
    "Roles": {
        "entries": [
            {
                "value": "Administrators"
            },
            {
                "value": "TPS Agents"
            },
            {
                "value": "TPS Officers"
            },
            {
                "value": "TPS Operators"
            }
        ]
    }
}

These responses are inconsistent and not very user-friendly. They should be simplified into the following XML format:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Account id="testuser">
    <Email>testuser@example.com</Email>
    <FullName>Test User</FullName>
    <Roles>
        <Role>admin</Role>
        <Role>agent</Role>
    </Roles>
</Account>

and JSON format:

{
    "id": "tpsadmin",
    "FullName": "tpsadmin",
    "Email": "tpsadmin@example.com",
    "Roles": {
        "Role": [
            "Administrators",
            "TPS Agents",
            "TPS Officers",
            "TPS Operators"
        ]
    }
}

Fixed in master: e57a2d410d19d72e902bd1792e01f1f238f2ed63

Metadata Update from @edewata:
- Issue assigned to edewata
- Issue set to the milestone: 10.2.3

7 years ago

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/1905

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Login to comment on this ticket.

Metadata