-
Notifications
You must be signed in to change notification settings - Fork 4
New flow changes #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Bod9001
wants to merge
17
commits into
develop
Choose a base branch
from
NewFlowChanges
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
New flow changes #100
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
fbcb650
more stuff
Bod9001 f87926c
new flow
Bod9001 2acf6c8
Update
Bod9001 5f81d5f
Changes
Bod9001 96cf76c
fixes
Bod9001 3b21605
fox
Bod9001 89c4490
fix
Bod9001 4c0a8c1
Dumdum
Bod9001 b853163
ruff format
Bod9001 de4d1bd
Requested changees
Bod9001 be17eab
Command
Bod9001 ef9c4bd
fix
Bod9001 4fa966d
fix
Bod9001 bb33dfd
gix
Bod9001 37280ba
al;l good?
Bod9001 1b05dc4
format
Bod9001 0354cb1
fix
Bod9001 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| meta { | ||
| name: check token | ||
| type: http | ||
| seq: 2 | ||
| } | ||
|
|
||
| post { | ||
| url: http://127.0.0.1:8000/accounts/check-SHA512-for-account/ | ||
Bod9001 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| body: json | ||
| auth: none | ||
| } | ||
|
|
||
| body:json { | ||
| { | ||
| "sha512_token" : "AA", | ||
| "unique_identifier" : "bob" | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| meta { | ||
| name: SHAChecks | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. don't commit bruno files. It was good before we had any auto documentation on the endpoints but now it will just confuse other developers. I'd say you can even remove the whole |
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| meta { | ||
| name: register token | ||
| type: http | ||
| seq: 1 | ||
| } | ||
|
|
||
| post { | ||
| url: http://127.0.0.1:8000/accounts/register-SHA512-for-account/ | ||
Bod9001 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| body: json | ||
| auth: inherit | ||
| } | ||
|
|
||
| headers { | ||
| Authorization: Token 894bf0bfd6ef6c05feb6a3447dfc2f3a2fb0147cd7da498d2843021794297cf0 | ||
| } | ||
|
|
||
| body:json { | ||
| { | ||
| "sha512_token" : "AA" | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| meta { | ||
| name: Get charracter token | ||
| type: http | ||
| seq: 7 | ||
| } | ||
|
|
||
| post { | ||
| url: http://127.0.0.1:8000/persistence/characters/GenForkToken | ||
Bod9001 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| body: json | ||
| auth: none | ||
| } | ||
|
|
||
| headers { | ||
| Authorization: Token 7cac756254c5574dbdd69e2129394337158b7929446576ede3fb2a43e179540c | ||
| } | ||
|
|
||
| body:json { | ||
| { | ||
| "fork_compatibility": "UnityStationDevelop" | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| meta { | ||
| name: GetCompatible Token | ||
| type: http | ||
| seq: 8 | ||
| } | ||
|
|
||
| get { | ||
| url: http://localhost:8000/persistence/characters/compatibleToken?character_sheet_version=1.0.0 | ||
Bod9001 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| body: none | ||
| auth: none | ||
| } | ||
|
|
||
| params:query { | ||
| character_sheet_version: 1.0.0 | ||
| } | ||
|
|
||
| headers { | ||
| X-Character-Token: eyJzZXJ2ZXJfaWQiOiJVbml0eVN0YXRpb25EZXZlbG9wIiwidXVpZCI6ImJvYiIsIm5vbmNlIjoiMTFkMTI3NzdhNTZlNWViZCJ9:1ukm1R:-l14SCkeDVJHIx9_J8fAUeQDIoHCcDavviBmqtpqcBo | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| meta { | ||
| name: admin | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
19 changes: 19 additions & 0 deletions
19
src/accounts/management/commands/clear_expired_challenges.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import logging | ||
|
|
||
| from datetime import timedelta | ||
|
|
||
| from django.core.management.base import BaseCommand | ||
| from django.utils import timezone | ||
|
|
||
| from accounts.models import SHA512Token | ||
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
||
|
|
||
| class Command(BaseCommand): | ||
| help = "Delete expired SHA512 tokens (older than 3 minutes)" | ||
|
|
||
| def handle(self, *args, **kwargs): | ||
| cutoff = timezone.now() - timedelta(minutes=3) | ||
| deleted, _ = SHA512Token.objects.filter(created_at__lt=cutoff).delete() | ||
| self.stdout.write(f"Deleted {deleted} expired SHA512 tokens.") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # Generated by Django 3.2.25 on 2025-08-03 16:41 | ||
|
|
||
| from django.conf import settings | ||
| from django.db import migrations, models | ||
| import django.db.models.deletion | ||
|
|
||
|
|
||
| class Migration(migrations.Migration): | ||
|
|
||
| dependencies = [ | ||
| ('accounts', '0004_alter_account_username'), | ||
| ] | ||
|
|
||
| operations = [ | ||
| migrations.CreateModel( | ||
| name='SHA512Token', | ||
| fields=[ | ||
Bod9001 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
| ('token', models.CharField(max_length=128)), | ||
| ('created_at', models.DateTimeField(auto_now_add=True)), | ||
| ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sha512_tokens', to=settings.AUTH_USER_MODEL)), | ||
| ], | ||
| ), | ||
| ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.