docs(bruno): new bruno files

This commit is contained in:
2026-06-22 22:09:10 +01:00
parent dc5af8f868
commit e9abdfb44a
16 changed files with 245 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
meta {
name: Get Google Token
type: http
seq: 3
}
get {
url:
body: none
auth: oauth2
}
auth:oauth2 {
grant_type: authorization_code
callback_url: http://localhost:8080
authorization_url: https://accounts.google.com/o/oauth2/v2/auth
access_token_url: https://oauth2.googleapis.com/token
refresh_token_url:
client_id: {{google_client_id}}
client_secret: {{google_secret}}
scope: profile email openid
state:
pkce: true
credentials_placement: body
credentials_id: credentials
token_placement: header
token_header_prefix: Bearer
auto_fetch_token: true
auto_refresh_token: false
}

View File

@@ -0,0 +1,11 @@
meta {
name: Get User
type: http
seq: 1
}
get {
url: {{base_url}}/users/me
body: none
auth: inherit
}

View File

@@ -0,0 +1,21 @@
meta {
name: Login
type: http
seq: 2
}
post {
url: {{base_url}}/users/login
body: json
auth: none
}
body:json {
{
"token": "{{$oauth2.credentials.id_token}}"
}
}
script:post-response {
bru.setEnvVar("token", res.getBody().data.token);
}

View File

@@ -0,0 +1,8 @@
meta {
name: Users
seq: 5
}
auth {
mode: inherit
}