chore: Adds user creation route.
This commit is contained in:
parent
c7b71e754f
commit
1237a31f8b
29 changed files with 630 additions and 63 deletions
28
routes/Hermes API/Backend/Create.bru
Normal file
28
routes/Hermes API/Backend/Create.bru
Normal file
|
@ -0,0 +1,28 @@
|
|||
meta {
|
||||
name: Create
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://127.0.0.1:3000/api/v1/backends/create
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"token": "9d99397be36747b9e6f1858f1efded4756ea5b479fd5c47a6388041eecb44b4958858c6fe15f23a9cf5e9d67f48443c65342e3a69bfde231114df4bb2ab457",
|
||||
"name": "Passyfire Reimpl",
|
||||
"description": "PassyFire never dies",
|
||||
"backend": "passyfire",
|
||||
"connectionDetails": {
|
||||
"ip": "127.0.0.1",
|
||||
"port": 22,
|
||||
|
||||
"users": {
|
||||
"g"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
17
routes/Hermes API/Backend/Lookup.bru
Normal file
17
routes/Hermes API/Backend/Lookup.bru
Normal file
|
@ -0,0 +1,17 @@
|
|||
meta {
|
||||
name: Lookup
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://127.0.0.1:3000/api/v1/backends/lookup
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"token": "7d69814cdada551dd22521ad97b23b22a106278826a2b4e87dd76246594b56f973894e8265437a5d520ed7258d7c856d0d294e89b1de1a98db7fa4a"
|
||||
}
|
||||
}
|
23
routes/Hermes API/Backend/Remove.bru
Normal file
23
routes/Hermes API/Backend/Remove.bru
Normal file
|
@ -0,0 +1,23 @@
|
|||
meta {
|
||||
name: Remove
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://127.0.0.1:3000/api/v1/backends/create
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"token": "f1b89cc337073476289ade17ffbe7a6419b4bd52aa7ede26114bffd76fa263b5cb1bcaf389462e1d9e7acb7f4b6a7c28152a9cc9af83e3ec862f1892b1",
|
||||
"name": "PortCopier Route",
|
||||
"description": "This is a test route for portcopier.",
|
||||
"backend": "PortCopier",
|
||||
"connectionDetails": {
|
||||
"funny": true
|
||||
}
|
||||
}
|
||||
}
|
28
routes/Hermes API/Forward/Create.bru
Normal file
28
routes/Hermes API/Forward/Create.bru
Normal file
|
@ -0,0 +1,28 @@
|
|||
meta {
|
||||
name: Create
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://127.0.0.1:3000/api/v1/forward/create
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"token": "914abf2223f84375eed884671bfaefd7755d378af496b345f322214e75b51ed4465f11e26c944914c9b4fcc35c53250325fbc6530853ddfed8f72976d6fc5",
|
||||
"name": "Test Route",
|
||||
"description": "This is a test route for SSH",
|
||||
|
||||
"protocol": "tcp",
|
||||
|
||||
"sourceIP": "127.0.0.1",
|
||||
"sourcePort": "8000",
|
||||
|
||||
"destinationPort": "9000",
|
||||
|
||||
"providerID": "1"
|
||||
}
|
||||
}
|
18
routes/Hermes API/Forward/Get Inbound Connections.bru
Normal file
18
routes/Hermes API/Forward/Get Inbound Connections.bru
Normal file
|
@ -0,0 +1,18 @@
|
|||
meta {
|
||||
name: Get Inbound Connections
|
||||
type: http
|
||||
seq: 6
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://127.0.0.1:3000/api/v1/forward/connections
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"token": "914abf2223f84375eed884671bfaefd7755d378af496b345f322214e75b51ed4465f11e26c944914c9b4fcc35c53250325fbc6530853ddfed8f72976d6fc5",
|
||||
"id": "1"
|
||||
}
|
||||
}
|
18
routes/Hermes API/Forward/Lookup.bru
Normal file
18
routes/Hermes API/Forward/Lookup.bru
Normal file
|
@ -0,0 +1,18 @@
|
|||
meta {
|
||||
name: Lookup
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://127.0.0.1:3000/api/v1/forward/lookup
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"token": "535c80825631c04b9add7a8682e06799d62ba57b5089b557f5bab2183fc9926b187b3b8d96da8ef16c67ec80f2917cf81bc21337f47728534f58ac9c4ed5f3fe",
|
||||
"protocol": "tcp"
|
||||
}
|
||||
}
|
26
routes/Hermes API/Forward/Remove.bru
Normal file
26
routes/Hermes API/Forward/Remove.bru
Normal file
|
@ -0,0 +1,26 @@
|
|||
meta {
|
||||
name: Remove
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://127.0.0.1:3000/api/v1/forward/remove
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"token": "f1b89cc337073476289ade17ffbe7a6419b4bd52aa7ede26114bffd76fa263b5cb1bcaf389462e1d9e7acb7f4b6a7c28152a9cc9af83e3ec862f1892b1",
|
||||
"name": "Test Route",
|
||||
"description": "This is a test route for portcopier.",
|
||||
|
||||
"sourceIP": "127.0.0.1",
|
||||
"sourcePort": "8000",
|
||||
|
||||
"destinationPort": "9000",
|
||||
|
||||
"providerID": "1"
|
||||
}
|
||||
}
|
18
routes/Hermes API/Forward/Start.bru
Normal file
18
routes/Hermes API/Forward/Start.bru
Normal file
|
@ -0,0 +1,18 @@
|
|||
meta {
|
||||
name: Start
|
||||
type: http
|
||||
seq: 4
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://127.0.0.1:3000/api/v1/forward/start
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"token": "914abf2223f84375eed884671bfaefd7755d378af496b345f322214e75b51ed4465f11e26c944914c9b4fcc35c53250325fbc6530853ddfed8f72976d6fc5",
|
||||
"id": "1"
|
||||
}
|
||||
}
|
18
routes/Hermes API/Forward/Stop.bru
Normal file
18
routes/Hermes API/Forward/Stop.bru
Normal file
|
@ -0,0 +1,18 @@
|
|||
meta {
|
||||
name: Stop
|
||||
type: http
|
||||
seq: 5
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://127.0.0.1:3000/api/v1/forward/stop
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"token": "914abf2223f84375eed884671bfaefd7755d378af496b345f322214e75b51ed4465f11e26c944914c9b4fcc35c53250325fbc6530853ddfed8f72976d6fc5",
|
||||
"id": "1"
|
||||
}
|
||||
}
|
17
routes/Hermes API/Get Permissions.bru
Normal file
17
routes/Hermes API/Get Permissions.bru
Normal file
|
@ -0,0 +1,17 @@
|
|||
meta {
|
||||
name: Get Permissions
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://127.0.0.1:3000/api/v1/getPermissions
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"token": "5e2cb92a338a832d385790861312eb85d69f46f82317bfa984ac5e3517368ab5a827897b0f9775a9181b02fa3b9cffed7e59e5b3111d5bdc37f729156caf5f"
|
||||
}
|
||||
}
|
20
routes/Hermes API/Users/Create.bru
Normal file
20
routes/Hermes API/Users/Create.bru
Normal file
|
@ -0,0 +1,20 @@
|
|||
meta {
|
||||
name: Create
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://127.0.0.1:8000/api/v1/users/create
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"name": "Test User",
|
||||
"email": "test@example.com",
|
||||
"username": "testuser",
|
||||
"password": "hunter123"
|
||||
}
|
||||
}
|
18
routes/Hermes API/Users/Log In.bru
Normal file
18
routes/Hermes API/Users/Log In.bru
Normal file
|
@ -0,0 +1,18 @@
|
|||
meta {
|
||||
name: Log In
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://127.0.0.1:3000/api/v1/users/login
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"email": "me@greysoh.dev",
|
||||
"password": "password"
|
||||
}
|
||||
}
|
18
routes/Hermes API/Users/Lookup.bru
Normal file
18
routes/Hermes API/Users/Lookup.bru
Normal file
|
@ -0,0 +1,18 @@
|
|||
meta {
|
||||
name: Lookup
|
||||
type: http
|
||||
seq: 4
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://127.0.0.1:3000/api/v1/users/lookup
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"token": "5e2cb92a338a832d385790861312eb85d69f46f82317bfa984ac5e3517368ab5a827897b0f9775a9181b02fa3b9cffed7e59e5b3111d5bdc37f729156caf5f",
|
||||
"name": "Greyson Hofer"
|
||||
}
|
||||
}
|
18
routes/Hermes API/Users/Remove.bru
Normal file
18
routes/Hermes API/Users/Remove.bru
Normal file
|
@ -0,0 +1,18 @@
|
|||
meta {
|
||||
name: Remove
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://127.0.0.1:3000/api/v1/users/remove
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"token": "5e2cb92a338a832d385790861312eb85d69f46f82317bfa984ac5e3517368ab5a827897b0f9775a9181b02fa3b9cffed7e59e5b3111d5bdc37f729156caf5f",
|
||||
"uid": "2"
|
||||
}
|
||||
}
|
5
routes/Hermes API/bruno.json
Normal file
5
routes/Hermes API/bruno.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"version": "1",
|
||||
"name": "Hermes",
|
||||
"type": "collection"
|
||||
}
|
3
routes/Hermes API/runroute.sh
Executable file
3
routes/Hermes API/runroute.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
npx @usebruno/cli run "$1" --output /tmp/out.json
|
||||
cat /tmp/out.json | less
|
Loading…
Add table
Add a link
Reference in a new issue