kanboard / plugin-oauth2

Generic OAuth2 authentication plugin
MIT License
27 stars 33 forks source link

How to get the user attributes in a nested json response? #3

Closed EdwardNavarro closed 6 years ago

EdwardNavarro commented 7 years ago

Hi @fguillot,

How I can get a value of a nested key from a json response? The plugin get only the first level of json response ex:

{
  "login": "EdwardNavarro",
  "id": 0987654321,
  "mail": "mail@mail.com",
}

But, if my IDP send me the next json response, how i can do to get the "mail" key from the response and use in the plugin setting?

{
  "attributes": {
    "cn": [
      "Edward Navarro"
    ],
    "mail": [
      "mail@mail.com"
    ]
  },
  "username": "enavarro"
}

Thanks for your help!

fguillot commented 7 years ago

The plugin doesn't supports that at the moment. The implementation need to be improved.

For my information, what kind of service did you try to connect to?

ghost commented 6 years ago

This issue has been closed automatically for inactivity after more than 1 year. Unfortunately, this project doesn't have enough resources to manage all these requests. Read the FAQ.