Several fixes
All checks were successful
Build, Push and Deploy / build-and-deploy (push) Successful in 55s
All checks were successful
Build, Push and Deploy / build-and-deploy (push) Successful in 55s
- added organizations - added industries - added logo in 2 colors for light and dark theme - improved authorization to allow multi tenancy - added Bruno configs
This commit is contained in:
48
bruno/propify/Authenticate/Auth Bruno.bru
Normal file
48
bruno/propify/Authenticate/Auth Bruno.bru
Normal file
@@ -0,0 +1,48 @@
|
||||
meta {
|
||||
name: Auth Bruno
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{KEYCLOAK_BASE_URL}}/realms/{{KEYCLOAK_REALM}}/protocol/openid-connect/token
|
||||
body: formUrlEncoded
|
||||
auth: inherit
|
||||
}
|
||||
|
||||
headers {
|
||||
Content-Type: application/x-www-form-urlencoded
|
||||
}
|
||||
|
||||
body:form-urlencoded {
|
||||
grant_type: client_credentials
|
||||
client_id: {{KEYCLOAK_BRUNO_CLIENT_ID}}
|
||||
client_secret: {{KEYCLOAK_BRUNO_CLIENT_SECRET}}
|
||||
}
|
||||
|
||||
script:post-response {
|
||||
// Parse die JSON-Antwort
|
||||
const jsonResponse = res.body;
|
||||
|
||||
|
||||
if (jsonResponse.access_token) {
|
||||
// Schreibe den access_token in eine Umgebungsvariable
|
||||
// oder in eine collection-Variable
|
||||
|
||||
// Option 1: In eine Umgebungsvariable schreiben
|
||||
// (z.B. für eine bestimmte Umgebung wie "Development")
|
||||
bru.setEnvVar("BEARER_TOKEN", jsonResponse.access_token);
|
||||
|
||||
console.log("Updated access token.");
|
||||
// Option 2: In eine Collection-Variable schreiben
|
||||
// (Diese Variable ist global für alle Anfragen in deiner Collection)
|
||||
// bru.setVar("bearerToken", "Bearer " + jsonResponse.access_token);
|
||||
} else {
|
||||
// optional: Error Handling, falls der Token nicht in der Antwort ist
|
||||
console.log("Error: access_token not found in the response.");
|
||||
}
|
||||
}
|
||||
|
||||
settings {
|
||||
encodeUrl: false
|
||||
}
|
||||
Reference in New Issue
Block a user