File tree Expand file tree Collapse file tree 5 files changed +15
-21
lines changed Expand file tree Collapse file tree 5 files changed +15
-21
lines changed Original file line number Diff line number Diff line change 1
1
# Test Apps
2
2
3
3
These apps are for local end to end testing of DOT features. They were implemented to save maintainers the trouble of setting up
4
- local test environments.
4
+ local test environments. You should be able to start both and instance of the IDP and RP using the directions below, then test the
5
+ functionality of the IDP using the RP.
5
6
6
7
## /tests/app/idp
7
8
@@ -29,7 +30,7 @@ password: password
29
30
You can update data in the IDP and then dump the data to a new seed file as follows.
30
31
31
32
```
32
- python -Xutf8 ./manage.py dumpdata -e sessions -e admin.logentry -e auth.permission -e contenttypes.contenttype --natural-foreign --natural-primary --indent 2 > fixtures/seed.json
33
+ python -Xutf8 ./manage.py dumpdata -e sessions -e admin.logentry -e auth.permission -e contenttypes.contenttype -e oauth2_provider.accesstoken -e oauth2_provider.refreshtoken -e oauth2_provider.idtoken --natural-foreign --natural-primary --indent 2 > fixtures/seed.json
33
34
```
34
35
35
36
## /test/app/rp
Original file line number Diff line number Diff line change 1
1
# TEST IDP
2
2
3
- This is an example IDP implementation for end to end testing.
4
-
5
- username: superuser
6
- password: password
7
-
8
- ## Development Tasks
9
-
10
- * update fixtures
11
-
12
- ```
13
- python -Xutf8 ./manage.py dumpdata -e sessions -e admin.logentry -e auth.permission -e contenttypes.contenttype -e oauth2_provider.grant -e oauth2_provider.accesstoken -e oauth2_provider.refreshtoken -e oauth2_provider.idtoken --natural-foreign --natural-primary --indent 2 > fixtures/seed.json
14
- ```
15
-
16
- * check seeds as you produce them to makre sure any unrequired models are excluded to keep our seeds as small as possible.*
3
+ see ../README.md
Original file line number Diff line number Diff line change 3
3
"model" : " auth.user" ,
4
4
"fields" : {
5
5
"password" : " pbkdf2_sha256$390000$29LoVHfFRlvEOJ9clv73Wx$fx5ejfUJ+nYsnBXFf21jZvDsq4o3p5io3TrAGKAVTq4=" ,
6
- "last_login" : " 2023-10-05T14:39:15.980Z " ,
6
+ "last_login" : " 2023-11-11T17:24:19.359Z " ,
7
7
"is_superuser" : true ,
8
8
"username" : " superuser" ,
9
9
"first_name" : " " ,
30
30
"name" : " OIDC - Authorization Code" ,
31
31
"skip_authorization" : true ,
32
32
"created" : " 2023-05-01T20:27:46.167Z" ,
33
- "updated" : " 2023-05-11T16:37:21.669Z" ,
34
- "algorithm" : " RS256"
33
+ "updated" : " 2023-11-11T17:23:44.643Z" ,
34
+ "algorithm" : " RS256" ,
35
+ "allowed_origins" : " http://localhost:5173\r\n http://127.0.0.1:5173"
35
36
}
36
37
}
37
38
]
Original file line number Diff line number Diff line change 3
3
4
4
5
5
def cors_allow_origin (sender , request , ** kwargs ):
6
- return request .path == "/o/userinfo/" or request .path == "/o/userinfo"
6
+ return (
7
+ request .path == "/o/userinfo/"
8
+ or request .path == "/o/userinfo"
9
+ or request .path == "/o/.well-known/openid-configuration"
10
+ or request .path == "/o/.well-known/openid-configuration/"
11
+ )
7
12
8
13
9
14
class IDPAppConfig (AppConfig ):
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const metadata = {};
20
20
21
21
{#if browser }
22
22
<OidcContext
23
- issuer =" http://127.0.0.1 :8000/o"
23
+ issuer =" http://localhost :8000/o"
24
24
client _id=" 2EIxgjlyy5VgCp2fjhEpKLyRtSMMPK0hZ0gBpNdm"
25
25
redirect _uri=" http://localhost:5173"
26
26
post _logout_redirect_uri=" http://localhost:5173"
You can’t perform that action at this time.
0 commit comments