feat: add support for request ID tracking across services
- Implemented request ID handling in various services and handlers to improve traceability of requests. - Added new AuthOptions endpoint to expose WxWork and OIDC configuration options. - Updated message and event logging to include request ID for better debugging. - Enhanced login form to dynamically show available authentication options based on server configuration. - Introduced utility functions for normalizing and ensuring valid request IDs. - Updated tests to verify request ID functionality in message sending and event logging.
This commit is contained in:
@@ -6,6 +6,17 @@ export type LoginRequest = {
|
||||
password: string
|
||||
}
|
||||
|
||||
export type AuthOptions = {
|
||||
wxworkEnabled: boolean
|
||||
oidcEnabled: boolean
|
||||
}
|
||||
|
||||
export async function fetchAuthOptions() {
|
||||
return request<AuthOptions>("/api/auth/options", {
|
||||
skipAuth: true,
|
||||
})
|
||||
}
|
||||
|
||||
export async function loginWithPassword(payload: LoginRequest) {
|
||||
const data = await request<AuthSession>("/api/auth/login", {
|
||||
method: "POST",
|
||||
|
||||
Reference in New Issue
Block a user