mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-13 08:15:21 +02:00
feat: add authentication for OSS (#167)
* feat: add authentication for OSS Fixes #157 and #156 * fix: fix token generation * fix: limit fastapi workers to 1
This commit is contained in:
parent
0791975864
commit
642cc34e8c
48 changed files with 994 additions and 303 deletions
File diff suppressed because one or more lines are too long
|
|
@ -80,6 +80,11 @@ export type AdminCommentResponse = {
|
|||
admin_comment_ts: string;
|
||||
};
|
||||
|
||||
export type AuthResponse = {
|
||||
token: string;
|
||||
user: UserResponse;
|
||||
};
|
||||
|
||||
export type AuthUserResponse = {
|
||||
id: number;
|
||||
is_superuser: boolean;
|
||||
|
|
@ -599,6 +604,8 @@ export type HealthResponse = {
|
|||
status: string;
|
||||
version: string;
|
||||
backend_api_endpoint: string;
|
||||
deployment_mode: string;
|
||||
auth_provider: string;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -721,6 +728,11 @@ export type LoadTestStatsResponse = {
|
|||
}>;
|
||||
};
|
||||
|
||||
export type LoginRequest = {
|
||||
email: string;
|
||||
password: string;
|
||||
};
|
||||
|
||||
export type PresignedUploadUrlRequest = {
|
||||
/**
|
||||
* CSV filename
|
||||
|
|
@ -808,6 +820,12 @@ export type SessionResponse = {
|
|||
expires_at: string;
|
||||
};
|
||||
|
||||
export type SignupRequest = {
|
||||
email: string;
|
||||
password: string;
|
||||
name?: string | null;
|
||||
};
|
||||
|
||||
export type SuperuserWorkflowRunResponse = {
|
||||
id: number;
|
||||
name: string;
|
||||
|
|
@ -1129,6 +1147,13 @@ export type UserConfigurationRequestResponseSchema = {
|
|||
} | null;
|
||||
};
|
||||
|
||||
export type UserResponse = {
|
||||
id: number;
|
||||
email: string | null;
|
||||
name?: string | null;
|
||||
organization_id?: number | null;
|
||||
};
|
||||
|
||||
export type ValidateWorkflowResponse = {
|
||||
is_valid: boolean;
|
||||
errors: Array<WorkflowError>;
|
||||
|
|
@ -5018,6 +5043,97 @@ export type SearchChunksApiV1KnowledgeBaseSearchPostResponses = {
|
|||
|
||||
export type SearchChunksApiV1KnowledgeBaseSearchPostResponse = SearchChunksApiV1KnowledgeBaseSearchPostResponses[keyof SearchChunksApiV1KnowledgeBaseSearchPostResponses];
|
||||
|
||||
export type SignupApiV1AuthSignupPostData = {
|
||||
body: SignupRequest;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: '/api/v1/auth/signup';
|
||||
};
|
||||
|
||||
export type SignupApiV1AuthSignupPostErrors = {
|
||||
/**
|
||||
* Not found
|
||||
*/
|
||||
404: unknown;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type SignupApiV1AuthSignupPostError = SignupApiV1AuthSignupPostErrors[keyof SignupApiV1AuthSignupPostErrors];
|
||||
|
||||
export type SignupApiV1AuthSignupPostResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: AuthResponse;
|
||||
};
|
||||
|
||||
export type SignupApiV1AuthSignupPostResponse = SignupApiV1AuthSignupPostResponses[keyof SignupApiV1AuthSignupPostResponses];
|
||||
|
||||
export type LoginApiV1AuthLoginPostData = {
|
||||
body: LoginRequest;
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: '/api/v1/auth/login';
|
||||
};
|
||||
|
||||
export type LoginApiV1AuthLoginPostErrors = {
|
||||
/**
|
||||
* Not found
|
||||
*/
|
||||
404: unknown;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type LoginApiV1AuthLoginPostError = LoginApiV1AuthLoginPostErrors[keyof LoginApiV1AuthLoginPostErrors];
|
||||
|
||||
export type LoginApiV1AuthLoginPostResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: AuthResponse;
|
||||
};
|
||||
|
||||
export type LoginApiV1AuthLoginPostResponse = LoginApiV1AuthLoginPostResponses[keyof LoginApiV1AuthLoginPostResponses];
|
||||
|
||||
export type GetCurrentUserApiV1AuthMeGetData = {
|
||||
body?: never;
|
||||
headers?: {
|
||||
authorization?: string | null;
|
||||
'X-API-Key'?: string | null;
|
||||
};
|
||||
path?: never;
|
||||
query?: never;
|
||||
url: '/api/v1/auth/me';
|
||||
};
|
||||
|
||||
export type GetCurrentUserApiV1AuthMeGetErrors = {
|
||||
/**
|
||||
* Not found
|
||||
*/
|
||||
404: unknown;
|
||||
/**
|
||||
* Validation Error
|
||||
*/
|
||||
422: HttpValidationError;
|
||||
};
|
||||
|
||||
export type GetCurrentUserApiV1AuthMeGetError = GetCurrentUserApiV1AuthMeGetErrors[keyof GetCurrentUserApiV1AuthMeGetErrors];
|
||||
|
||||
export type GetCurrentUserApiV1AuthMeGetResponses = {
|
||||
/**
|
||||
* Successful Response
|
||||
*/
|
||||
200: UserResponse;
|
||||
};
|
||||
|
||||
export type GetCurrentUserApiV1AuthMeGetResponse = GetCurrentUserApiV1AuthMeGetResponses[keyof GetCurrentUserApiV1AuthMeGetResponses];
|
||||
|
||||
export type HealthApiV1HealthGetData = {
|
||||
body?: never;
|
||||
path?: never;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue