Files
lua-scripts-w-api/contrib/darktable-api/bruno/auth/Get Token (Bad Secret).bru
stephen schuresko bd40b4f850 Add darktable REST API implementation
- Introduced a new Lua-based REST API for darktable, allowing external applications to interact with the darktable library.
- Implemented core functionalities including image listing, retrieval, and preview serving.
- Added support for OAuth 2.0 authentication with token generation.
- Created a simple HTTP router to handle API requests.
- Included JSON encoding/decoding utilities for API responses.
- Developed a script to launch the API server alongside darktable, ensuring seamless integration.
- Added necessary configuration and setup for the API server, including CORS support and error handling.
2026-06-10 15:02:19 -04:00

34 lines
564 B
Plaintext

meta {
name: Get Token (Bad Secret)
type: http
seq: 2
}
post {
url: {{baseUrl}}/oauth/token
body: form-urlencoded
auth: none
}
body:form-urlencoded {
grant_type: client_credentials
client_id: {{clientId}}
client_secret: wrong-secret
}
tests {
test("returns 401", function() {
expect(res.status).to.equal(401);
});
test("error is invalid_client", function() {
expect(res.body.error).to.equal("invalid_client");
});
}
docs {
## Negative test — wrong client secret
Verifies the server rejects bad credentials with 401.
}