Skip to content

Commit

Permalink
fix: mismatched issuer origin for idp
Browse files Browse the repository at this point in the history
  • Loading branch information
dopry committed Nov 11, 2023
1 parent 2ea8222 commit 9b1e164
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 20 deletions.
5 changes: 3 additions & 2 deletions tests/app/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Test Apps

These apps are for local end to end testing of DOT features. They were implemented to save maintainers the trouble of setting up
local test environments.
local test environments. You should be able to start both and instance of the IDP and RP using the directions below, then test the
functionality of the IDP using the RP.

## /tests/app/idp

Expand Down Expand Up @@ -29,7 +30,7 @@ password: password
You can update data in the IDP and then dump the data to a new seed file as follows.

```
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
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
```

## /test/app/rp
Expand Down
15 changes: 1 addition & 14 deletions tests/app/idp/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
# TEST IDP

This is an example IDP implementation for end to end testing.

username: superuser
password: password

## Development Tasks

* update fixtures

```
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
```

*check seeds as you produce them to makre sure any unrequired models are excluded to keep our seeds as small as possible.*
see ../README.md
7 changes: 4 additions & 3 deletions tests/app/idp/fixtures/seed.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"model": "auth.user",
"fields": {
"password": "pbkdf2_sha256$390000$29LoVHfFRlvEOJ9clv73Wx$fx5ejfUJ+nYsnBXFf21jZvDsq4o3p5io3TrAGKAVTq4=",
"last_login": "2023-10-05T14:39:15.980Z",
"last_login": "2023-11-11T17:24:19.359Z",
"is_superuser": true,
"username": "superuser",
"first_name": "",
Expand All @@ -30,8 +30,9 @@
"name": "OIDC - Authorization Code",
"skip_authorization": true,
"created": "2023-05-01T20:27:46.167Z",
"updated": "2023-05-11T16:37:21.669Z",
"algorithm": "RS256"
"updated": "2023-11-11T17:23:44.643Z",
"algorithm": "RS256",
"allowed_origins": "http://localhost:5173\r\nhttp://127.0.0.1:5173"
}
}
]
2 changes: 1 addition & 1 deletion tests/app/rp/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const metadata = {};

{#if browser}
<OidcContext
issuer="http://127.0.0.1:8000/o"
issuer="http://localhost:8000/o"
client_id="2EIxgjlyy5VgCp2fjhEpKLyRtSMMPK0hZ0gBpNdm"
redirect_uri="http://localhost:5173"
post_logout_redirect_uri="http://localhost:5173"
Expand Down

0 comments on commit 9b1e164

Please sign in to comment.