feat: add functional authentication
This commit is contained in:
28
api/.bruno/auth/Code.bru
Normal file
28
api/.bruno/auth/Code.bru
Normal file
@@ -0,0 +1,28 @@
|
||||
meta {
|
||||
name: Code
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{url}}/auth/code/:accountId/code/:codeId/:value
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
params:path {
|
||||
accountId:
|
||||
codeId:
|
||||
value:
|
||||
}
|
||||
|
||||
script:post-response {
|
||||
const cookies = res.getHeader('set-cookie');
|
||||
if (cookies) {
|
||||
bru.setVar("cookie", cookies.join('; '));
|
||||
}
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
}
|
||||
22
api/.bruno/auth/Email.bru
Normal file
22
api/.bruno/auth/Email.bru
Normal file
@@ -0,0 +1,22 @@
|
||||
meta {
|
||||
name: Email
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{url}}/auth/email
|
||||
body: json
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"base": "http://localhost:5170",
|
||||
"email": "john.doe@fixture.none"
|
||||
}
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
}
|
||||
15
api/.bruno/auth/Session.bru
Normal file
15
api/.bruno/auth/Session.bru
Normal file
@@ -0,0 +1,15 @@
|
||||
meta {
|
||||
name: Session
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{url}}/auth/session
|
||||
body: none
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: true
|
||||
}
|
||||
8
api/.bruno/auth/folder.bru
Normal file
8
api/.bruno/auth/folder.bru
Normal file
@@ -0,0 +1,8 @@
|
||||
meta {
|
||||
name: auth
|
||||
seq: 2
|
||||
}
|
||||
|
||||
auth {
|
||||
mode: inherit
|
||||
}
|
||||
Reference in New Issue
Block a user