Harden auth and security controls with session auth and docs
This commit is contained in:
@@ -58,6 +58,31 @@ export interface SearchResponse {
|
||||
items: DmsDocument[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents one authenticated user identity returned by backend auth endpoints.
|
||||
*/
|
||||
export interface AuthUser {
|
||||
id: string;
|
||||
username: string;
|
||||
role: 'admin' | 'user';
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents active authentication session metadata.
|
||||
*/
|
||||
export interface AuthSessionInfo {
|
||||
user: AuthUser;
|
||||
expires_at: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents login response payload with issued bearer token and session metadata.
|
||||
*/
|
||||
export interface AuthLoginResponse extends AuthSessionInfo {
|
||||
access_token: string;
|
||||
token_type: 'bearer';
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents distinct document type values available for filter controls.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user