-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: deps update and minor fixes (#57)
* chore: update dependencies * chore: remove unneeded parenthesis * fix: token authentication raising an exception For some reason it started failing and was trying to create new tokens when the token authorization wasn't present in the header * chore: adds some api collections for Bruno * chore: make the dumb linter happy
- Loading branch information
Showing
17 changed files
with
523 additions
and
262 deletions.
There are no files selected for viewing
This file contains 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,20 @@ | ||
meta { | ||
name: Invalid identifier | ||
type: http | ||
seq: 2 | ||
} | ||
|
||
post { | ||
url: {{baseUrl}}/accounts/register | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"account_identifier": "' 'DROP TABLE USERS;", | ||
"username": "My Name", | ||
"password": "qweasd123", | ||
"email": "[email protected]" | ||
} | ||
} |
This file contains 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,20 @@ | ||
meta { | ||
name: Valid | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
post { | ||
url: {{baseUrl}}/accounts/register | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"account_identifier": "myname", | ||
"username": "My Name", | ||
"password": "qweasd123", | ||
"email": "[email protected]" | ||
} | ||
} |
This file contains 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: non existent account | ||
type: http | ||
seq: 3 | ||
} | ||
|
||
post { | ||
url: {{baseUrl}}/accounts/login-credentials | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"email": "[email protected]", | ||
"password": "qweasd123" | ||
} | ||
} |
This file contains 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: not verified | ||
type: http | ||
seq: 2 | ||
} | ||
|
||
post { | ||
url: {{baseUrl}}/accounts/login-credentials | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"email": "[email protected]", | ||
"password": "qweasd123" | ||
} | ||
} |
This file contains 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: success | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
post { | ||
url: {{baseUrl}}/accounts/login-credentials | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"email": "[email protected]", | ||
"password": "admin" | ||
} | ||
} |
This file contains 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,22 @@ | ||
meta { | ||
name: invalid token | ||
type: http | ||
seq: 3 | ||
} | ||
|
||
post { | ||
url: {{baseUrl}}/accounts/login-token | ||
body: json | ||
auth: none | ||
} | ||
|
||
headers { | ||
Authorization: Token 6dc6178ad72f5beA0581b6b49024cdbb41d85ffdd1fbbf40991cce24a69a327b | ||
} | ||
|
||
body:json { | ||
{ | ||
"username": "[email protected]", | ||
"password": "admin" | ||
} | ||
} |
This file contains 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: missing token | ||
type: http | ||
seq: 2 | ||
} | ||
|
||
post { | ||
url: {{baseUrl}}/accounts/login-token | ||
body: json | ||
auth: none | ||
} | ||
|
||
body:json { | ||
{ | ||
"username": "[email protected]", | ||
"password": "admin" | ||
} | ||
} |
This file contains 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,22 @@ | ||
meta { | ||
name: success | ||
type: http | ||
seq: 1 | ||
} | ||
|
||
post { | ||
url: {{baseUrl}}/accounts/login-token | ||
body: json | ||
auth: none | ||
} | ||
|
||
headers { | ||
Authorization: Token 6dc6178ad72f5bed0581b6b49024cdbb41d85ffdd1fbbf40991cce24a69a327b | ||
} | ||
|
||
body:json { | ||
{ | ||
"username": "[email protected]", | ||
"password": "admin" | ||
} | ||
} |
This file contains 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,5 @@ | ||
{ | ||
"version": "1", | ||
"name": "central-command", | ||
"type": "collection" | ||
} |
This file contains 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 @@ | ||
vars { | ||
baseUrl: http://localhost:8000 | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 |
---|---|---|
|
@@ -64,7 +64,7 @@ authors = ["Andrés Riquelme <[email protected]>"] | |
python = "^3.10" | ||
Django = "^3.2.12" | ||
djangorestframework = "^3.12.1" | ||
psycopg2-binary = "^2.8.6" | ||
psycopg2-binary = "2.9.9" | ||
django-email-verification = "^0.0.7" | ||
django-rest-knox = "^4.1.0" | ||
gunicorn = "^20.1.0" | ||
|
This file contains 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
19 changes: 19 additions & 0 deletions
19
src/accounts/migrations/0004_alter_account_verification_token.py
This file contains 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 @@ | ||
# Generated by Django 3.2.15 on 2023-10-23 15:34 | ||
|
||
from django.db import migrations, models | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('accounts', '0003_alter_account_verification_token'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='account', | ||
name='verification_token', | ||
field=models.UUIDField(blank=True, default=uuid.UUID('6c74ff29-b92d-4175-8581-e91c38b84195'), verbose_name='Verification token'), | ||
), | ||
] |
19 changes: 19 additions & 0 deletions
19
src/accounts/migrations/0005_alter_account_verification_token.py
This file contains 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 @@ | ||
# Generated by Django 3.2.15 on 2023-10-23 15:44 | ||
|
||
from django.db import migrations, models | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('accounts', '0004_alter_account_verification_token'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='account', | ||
name='verification_token', | ||
field=models.UUIDField(blank=True, default=uuid.UUID('32dfaa59-45fc-4c7a-bbd5-b195075e5f89'), verbose_name='Verification token'), | ||
), | ||
] |
19 changes: 19 additions & 0 deletions
19
src/accounts/migrations/0006_alter_account_verification_token.py
This file contains 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 @@ | ||
# Generated by Django 3.2.22 on 2023-10-23 15:53 | ||
|
||
from django.db import migrations, models | ||
import uuid | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('accounts', '0005_alter_account_verification_token'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='account', | ||
name='verification_token', | ||
field=models.UUIDField(blank=True, default=uuid.UUID('f4a76c91-a5b1-444e-af33-32c82ac1dc4b'), verbose_name='Verification token'), | ||
), | ||
] |
This file contains 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