Update bruno for Login, Logout, Register, and Session
This commit is contained in:
parent
4d8381dcea
commit
7f4f367cf4
18
bruno/Auth/Login.bru
Normal file
18
bruno/Auth/Login.bru
Normal file
@ -0,0 +1,18 @@
|
||||
meta {
|
||||
name: Login
|
||||
type: http
|
||||
seq: 5
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://localhost:11000/api/auth/login
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"username":"su",
|
||||
"password":"su"
|
||||
}
|
||||
}
|
15
bruno/Auth/Logout.bru
Normal file
15
bruno/Auth/Logout.bru
Normal file
@ -0,0 +1,15 @@
|
||||
meta {
|
||||
name: Logout
|
||||
type: http
|
||||
seq: 7
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://localhost:11000/api/auth/logout
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
|
||||
headers {
|
||||
Authorization: Bearer xx.xx.xx
|
||||
}
|
@ -5,11 +5,15 @@ meta {
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://localhost:11000/api/auth/register/su
|
||||
url: http://localhost:11000/api/auth/register/:roles
|
||||
body: json
|
||||
auth: none
|
||||
}
|
||||
|
||||
params:path {
|
||||
roles: su
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"captcha":"test",
|
||||
|
30
bruno/Auth/Session.bru
Normal file
30
bruno/Auth/Session.bru
Normal file
@ -0,0 +1,30 @@
|
||||
meta {
|
||||
name: Session
|
||||
type: http
|
||||
seq: 6
|
||||
}
|
||||
|
||||
post {
|
||||
url: http://localhost:11000/api/auth/session/:type
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
|
||||
params:path {
|
||||
type: check
|
||||
}
|
||||
|
||||
headers {
|
||||
Authorization: Bearer xx.xx.xx
|
||||
}
|
||||
|
||||
docs {
|
||||
This API only used when you use CostaPy as your main client.
|
||||
|
||||
Session have a 3 type:
|
||||
- `set` for set the Bearer inside the Authorization. Need to declare a `jwt` on JSON Body.
|
||||
- `check` for check the Bearer is still valid or not.
|
||||
- `out` for remove the Bearer inside of Authorization.
|
||||
|
||||
The `set`, `out`, and some part of `check` is still not tested yet. Need the interface to test it.
|
||||
}
|
Loading…
Reference in New Issue
Block a user