Fix .gitignore and add missing authentication source files
This commit fixes overly broad .gitignore patterns that were excluding important source code files from version control. Previously, wildcard patterns like *auth*, *token*, *secret*, *connection*, and *credential* were excluding ALL files containing these words, including critical application code. Changes: - Updated .gitignore with specific patterns for sensitive config files (*.json, *.txt, *.yml, *.yaml extensions only) - Removed broad wildcards that excluded source code files Added missing source files: - shared/auth/ (9 files): Complete authentication system - JWT handler, middleware, auth service, models, routes - reports-app/backend/app/routers/auth.py: Authentication API router - reports-app/backend/app/auth_middleware_wrapper.py: Middleware wrapper - reports-app/frontend/src/stores/auth.js: Vue.js auth store - reports-app/frontend/tests/: E2E tests and fixtures for auth - reports-app/telegram-bot/app/auth/: Telegram auth linking module - deployment/windows/scripts/Setup-ClaudeAuth.ps1: Windows deployment script - security/secrets_scanner.py: Security scanning utility These files are essential for the application to function and should have been included in the initial commit. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
60
reports-app/frontend/tests/fixtures/auth.js
vendored
Normal file
60
reports-app/frontend/tests/fixtures/auth.js
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
export const testCredentials = {
|
||||
valid: {
|
||||
username: 'testuser',
|
||||
password: 'testpass123'
|
||||
},
|
||||
invalid: {
|
||||
username: 'wronguser',
|
||||
password: 'wrongpass'
|
||||
},
|
||||
empty: {
|
||||
username: '',
|
||||
password: ''
|
||||
},
|
||||
partialValid: {
|
||||
username: 'testuser',
|
||||
password: ''
|
||||
}
|
||||
};
|
||||
|
||||
export const expectedMessages = {
|
||||
loginSuccess: 'Conectare reușită',
|
||||
loginError: 'Eroare de conectare',
|
||||
usernameRequired: 'Numele de utilizator este obligatoriu',
|
||||
passwordRequired: 'Parola este obligatorie',
|
||||
invalidCredentials: 'Date de conectare incorecte'
|
||||
};
|
||||
|
||||
export const apiEndpoints = {
|
||||
login: '/api/auth/login',
|
||||
logout: '/api/auth/logout',
|
||||
refresh: '/api/auth/refresh',
|
||||
user: '/api/auth/user'
|
||||
};
|
||||
|
||||
export const mockApiResponses = {
|
||||
loginSuccess: {
|
||||
status: 200,
|
||||
body: {
|
||||
access_token: 'mock_access_token',
|
||||
refresh_token: 'mock_refresh_token',
|
||||
user: {
|
||||
id: 1,
|
||||
username: 'testuser',
|
||||
full_name: 'Test User'
|
||||
}
|
||||
}
|
||||
},
|
||||
loginError: {
|
||||
status: 401,
|
||||
body: {
|
||||
detail: 'Invalid credentials'
|
||||
}
|
||||
},
|
||||
unauthorized: {
|
||||
status: 401,
|
||||
body: {
|
||||
detail: 'Not authenticated'
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user