Skip to content
This repository was archived by the owner on Jun 23, 2023. It is now read-only.

Commit 78cae68

Browse files
committed
chore: Documentation on CDB and minor changes
1 parent 630258b commit 78cae68

2 files changed

Lines changed: 77 additions & 8 deletions

File tree

docs/source/contents/conf.rst

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,3 +622,72 @@ the following::
622622
}
623623
}
624624
}
625+
626+
627+
=======
628+
Clients
629+
=======
630+
631+
In this section there are some client configuration examples.
632+
633+
A common configuration::
634+
635+
endpoint_context.cdb['jbxedfmfyc'] = {
636+
client_id: 'jbxedfmfyc',
637+
client_salt: '6flfsj0Z',
638+
registration_access_token: 'z3PCMmC1HZ1QmXeXGOQMJpWQNQynM4xY',
639+
registration_client_uri: 'https://127.0.0.1:8000/registration_api?client_id=jbxedfmfyc',
640+
client_id_issued_at: 1630256902,
641+
client_secret: '19cc69b70d0108f630e52f72f7a3bd37ba4e11678ad1a7434e9818e1',
642+
client_secret_expires_at: 1929727754,
643+
application_type: 'web',
644+
contacts: [
645+
'rp@example.com'
646+
],
647+
token_endpoint_auth_method: 'client_secret_basic',
648+
redirect_uris: [
649+
[
650+
'https://127.0.0.1:8090/authz_cb/satosa',
651+
{}
652+
]
653+
],
654+
post_logout_redirect_uris: [
655+
[
656+
'https://127.0.0.1:8090/session_logout/satosa',
657+
null
658+
]
659+
],
660+
response_types: [
661+
'code'
662+
],
663+
grant_types: [
664+
'authorization_code'
665+
],
666+
allowed_scopes: [
667+
'openid',
668+
'profile',
669+
'email',
670+
'offline_access'
671+
]
672+
}
673+
674+
675+
How to configure the release of the user claims per clients::
676+
677+
endpoint_context.cdb["client_1"] = {
678+
"client_secret": "hemligt",
679+
"redirect_uris": [("https://example.com/cb", None)],
680+
"client_salt": "salted",
681+
"token_endpoint_auth_method": "client_secret_post",
682+
"response_types": ["code", "token", "code id_token", "id_token"],
683+
"add_claims": {
684+
"always": {
685+
"introspection": ["nickname", "eduperson_scoped_affiliation"],
686+
"userinfo": ["picture", "phone_number"],
687+
},
688+
# this overload the general endpoint configuration for this client
689+
# self.server.server_get("endpoint", "id_token").kwargs = {"add_claims_by_scope": True}
690+
"by_scope": {
691+
"id_token": False,
692+
},
693+
},

docs/source/contents/usage.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Usage
22
-----
33

4-
Some examples, how to run flask_op and django_op, but also some typical configuration in relation to common use cases.
4+
Some examples, how to run [flask_op](https://github.com/IdentityPython/oidc-op/tree/master/example/flask_op) and [django_op](https://github.com/peppelinux/django-oidc-op) but also some typical configuration in relation to common use cases.
55

66

77

@@ -34,7 +34,7 @@ Get to the RP landing page to choose your authentication endpoint. The first opt
3434

3535
![OP Auth](../_images/2.png)
3636

37-
AS/OP accepted our authentication request and prompt to us the login form. Read passwd.json file to get credentials.
37+
The AS/OP supports dynamic client registration, it accepts the authentication request and prompt to us the login form. Read [passwd.json](https://github.com/IdentityPython/oidc-op/blob/master/example/flask_op/passwd.json) file to get credentials.
3838

3939
----------------------------------
4040

@@ -75,12 +75,12 @@ It is important to consider that only scope=offline_access will get a usable ref
7575

7676
oidc-op will return a json response like this::
7777

78-
{
79-
'access_token': 'eyJhbGc ... CIOH_09tT_YVa_gyTqg',
80-
'token_type': 'Bearer',
81-
'scope': 'openid profile email address phone offline_access',
82-
'refresh_token': 'Z0FBQ ... 1TE16cm1Tdg=='
83-
}
78+
{
79+
'access_token': 'eyJhbGc ... CIOH_09tT_YVa_gyTqg',
80+
'token_type': 'Bearer',
81+
'scope': 'openid profile email address phone offline_access',
82+
'refresh_token': 'Z0FBQ ... 1TE16cm1Tdg=='
83+
}
8484

8585

8686

0 commit comments

Comments
 (0)