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 11# Test Apps
22
33These 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.
56
67## /tests/app/idp
78
@@ -29,7 +30,7 @@ password: password
2930 You can update data in the IDP and then dump the data to a new seed file as follows.
3031
3132 ```
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
3334 ```
3435
3536## /test/app/rp
Original file line number Diff line number Diff line change 11# TEST IDP
22
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 33 "model" : " auth.user" ,
44 "fields" : {
55 "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 " ,
77 "is_superuser" : true ,
88 "username" : " superuser" ,
99 "first_name" : " " ,
3030 "name" : " OIDC - Authorization Code" ,
3131 "skip_authorization" : true ,
3232 "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"
3536 }
3637}
3738]
Original file line number Diff line number Diff line change 33
44
55def 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+ )
712
813
914class IDPAppConfig (AppConfig ):
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const metadata = {};
2020
2121{#if browser }
2222<OidcContext
23- issuer =" http://127.0.0.1 :8000/o"
23+ issuer =" http://localhost :8000/o"
2424 client _id=" 2EIxgjlyy5VgCp2fjhEpKLyRtSMMPK0hZ0gBpNdm"
2525 redirect _uri=" http://localhost:5173"
2626 post _logout_redirect_uri=" http://localhost:5173"
You can’t perform that action at this time.
0 commit comments