question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using example project only getting userinfo {"sub": "x"}

See original GitHub issue

How should I expand the userinfo returned by the example project. It only returns the sub. E.g.

{"sub": "3"}

From this, it seems I should create a custom userinfo function but not sure where to start with this.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
juanifiorencommented, Sep 19, 2016

Hi @spinza I’ll close this. Docs are now updated http://django-oidc-provider.readthedocs.io/en/v0.4.x/

If you have any question please create a new issue. Greetings!

1reaction
juanifiorencommented, Sep 17, 2016

Yes @spinza, that’s what you need.

Inside your oidc_provider_settings.py file add the following class:

from django.utils.translation import ugettext as _
from oidc_provider.lib.claims import ScopeClaims

class CustomScopeClaims(ScopeClaims):

    info_id = (
        _(u'Identifier'),
        _(u'Access to your user identifier.'),
    )

    def scope_id(self):
        dic = {
            'id': str(self.user.id),
        }

        return dic

Then open settings.py file and add the following line:

OIDC_EXTRA_SCOPE_CLAIMS = 'yourproject.oidc_provider_settings.CustomScopeClaims'
Read more comments on GitHub >

github_iconTop Results From Across the Web

oauth-userinfo endpoint only returning "sub" value in #curity
The user info endpoint and what is returned by that endpoint is configured by the owner of the authorization server you are connecting...
Read more >
ADFS support / top level config elements are only `vouch` and ...
The issue with ADFS is that we're not receiving an email from the user info enpdoint, only getting a "sub". So I can't...
Read more >
UserInfo endpoint | Ping Identity Documentation
This endpoint accepts HTTP GET requests without parameter. Clients must present valid access tokens for authentication. Endpoint: /idp/userinfo.
Read more >
Using OpenID Connect (OIDC) to Protect Service Applications ...
You can use the Quarkus OpenID Connect (OIDC) extension to secure your ... Create a new project with the following command: ... GET;...
Read more >
OpenID Connect | Authentication - Google Developers
To get help on Stack Overflow, tag your questions with 'google-oauth'. ... you must set up a project in the Google API Console...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found