cancel
Showing results for 
Search instead for 
Did you mean: 

Inconsistency in CAP Documentation Page Authentication

gregorw
Active Contributor

Hi iwona.jirschitzka,

on the CAP Documentation Page Authentication - Mocked Authentication - Default Configuration this standard configuration is shown:

cds.requires.auth = {
  strategy: "mock",
  users: {
    "alice": { "roles": ["admin"] },
    "bob": { "roles": ["builder"] },
    "*": true //> all other logins are allowed as well
  }
}

In the next section "Configuring Specific Users" shows this example:

"cds": { // in case of package.json
  "requires": {
    "strategy": "mock",
    "auth": {
      "users": {
        "<user.id>": { 
          "password": "<password>", 
          "roles": ["<role-name>", ...],
          "userAttributes": { ... }
        },
      }
    }
  }
}

I think it must be corrected to:

"cds": { // in case of package.json
  "requires": {
    "auth": {
      "strategy": "mock",
      "users": {
        "<user.id>": { 
          "password": "<password>", 
          "roles": ["<role-name>", ...],
          "userAttributes": { ... }
        },
      }
    }
  }
}

Best regards
Gregor

iwona_hahn
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Gregor,
Thank you for reporting this. I´ll get back to you asap.
Best regards,
Iwona

Accepted Solutions (1)

Accepted Solutions (1)

iwona_hahn
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi gregorw

We republished the documentation with your suggested changes.

Best regards,
Iwona

Answers (0)