Files
paul 55983d0088 feat: Implement user and policy management UI
- Add comprehensive user management with CRUD operations
- Implement policy management with templates and custom JSON
- Create reusable components (ConfirmDialog, LoadingState, EmptyState)
- Add user creation with password validation and credential copying
- Implement policy creation with built-in templates
- Add policy attachment to users functionality
- Include search, filtering, and status management
- Add proper error handling and validation
- Implement Material-UI based responsive design

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-23 16:45:39 +02:00

25 lines
562 B
TypeScript

export const getAuthHeaders = (): Record<string, string> => {
const token = localStorage.getItem('authToken');
if (!token) {
return {};
}
return {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json',
};
};
export const isAuthenticated = (): boolean => {
const token = localStorage.getItem('authToken');
return !!token;
};
export const setAuthToken = (token: string): void => {
localStorage.setItem('authToken', token);
};
export const clearAuthToken = (): void => {
localStorage.removeItem('authToken');
};