| ... | @@ -100,4 +100,8 @@ If you would like users from other sites to log into your site, then you will ne |
... | @@ -100,4 +100,8 @@ If you would like users from other sites to log into your site, then you will ne |
|
|
|
|
|
|
|
An example implementation of the Relying Party endpoint [can be found in DjangoLDP-Account](https://git.startinblox.com/djangoldp-packages/djangoldp-account/blob/master/djangoldp_account/endpoints/rp_login.py). When the user submits their webfinger ID or OIDC provider to the [login form](https://git.startinblox.com/djangoldp-packages/djangoldp-account/blob/master/djangoldp_account/templates/registration/login.html), the endpoint utilises [PyOIDC](https://pyoidc.readthedocs.io/en/latest/examples/rp.html) to discover the issuer of the provider, and provides the callback function in this endpoint to log the user in once authenticated
|
|
An example implementation of the Relying Party endpoint [can be found in DjangoLDP-Account](https://git.startinblox.com/djangoldp-packages/djangoldp-account/blob/master/djangoldp_account/endpoints/rp_login.py). When the user submits their webfinger ID or OIDC provider to the [login form](https://git.startinblox.com/djangoldp-packages/djangoldp-account/blob/master/djangoldp_account/templates/registration/login.html), the endpoint utilises [PyOIDC](https://pyoidc.readthedocs.io/en/latest/examples/rp.html) to discover the issuer of the provider, and provides the callback function in this endpoint to log the user in once authenticated
|
|
|
|
|
|
|
|
It's important to note that once the federated user has successfully logged in, their urlid should be set to that of their OIDC provider, so that their id is maintained as from the distant source |
|
It's important to note that once the federated user has successfully logged in, their urlid should be set to that of their OIDC provider, so that their id is maintained as from the distant source
|
|
\ No newline at end of file |
|
|
|
|
|
## Registering with the Django Admin
|
|
|
|
|
|
|
|
When using a custom user model in Django, it's common to register it with the admin via Django's `UserAdmin` class. We offer an extension to this class as `djangoldp.admin.DjangoLDPUserAdmin` which provides the same functionality with the [DjangoLDP admin dependencies](https://git.startinblox.com/djangoldp-packages/djangoldp#using-djangoldp) and ensures that federated fields (such as urlid) are included in the field sets, allowing administrators to easily create external resources |
|
|
|
\ No newline at end of file |