Files
authsec_react/src/services/mockData.js
T
2026-10-07 09:07:57 +05:30

104 lines
2.5 KiB
JavaScript

// Pre-configured mock data matching authsec_springboot schema
export const DEMO_USER = {
userId: 101,
firstName: "Alex",
lastName: "Vance",
fullname: "Alex Vance",
username: "alex.admin",
email: "admin@authsec.com",
phone: "+1 (555) 234-5678",
roles: ["ROLE_ADMIN", "SECURITY_OFFICER", "WORKSPACE_MANAGER"],
token: "eyJhbGciOiJIUzUxMiJ9.authsec_demo_token_authenticated_user_session_9942",
avatar: "https://images.unsplash.com/photo-1534528741775-53994a69daeb?auto=format&fit=crop&w=256&q=80",
lastLogin: new Date().toISOString(),
account: {
accountId: 4001,
name: "Enterprise Security Core",
plan: "Enterprise Shield",
status: "ACTIVE"
}
};
export const MOCK_STATS = [
{
id: "sessions",
title: "Active Sessions",
value: "1",
subtitle: "Current device IP: 127.0.0.1",
trend: "+0 this week",
status: "positive",
icon: "ShieldCheck"
},
{
id: "securityScore",
title: "Security Posture",
value: "98.4%",
subtitle: "JWT 512-bit & Role Guard enabled",
trend: "+2.1% optimal",
status: "positive",
icon: "Lock"
},
{
id: "workspaces",
title: "Managed Workspaces",
value: "4",
subtitle: "Production, Staging, QA, Dev",
trend: "All synced",
status: "neutral",
icon: "LayoutGrid"
},
{
id: "apiGateway",
title: "API Gateway",
value: "Healthy",
subtitle: "Spring Boot Port :9292",
trend: "24ms response",
status: "positive",
icon: "Activity"
}
];
export const MOCK_ACTIVITIES = [
{
id: "act-1",
type: "LOGIN_SUCCESS",
title: "Successful Session Authentication",
description: "Authenticated via Spring Boot /token/session endpoint",
timestamp: "Just now",
ip: "127.0.0.1",
badge: "SUCCESS",
icon: "Key"
},
{
id: "act-2",
type: "TOKEN_GENERATED",
title: "JWT Access Token Issued",
description: "Session authorization header applied with HMAC-SHA512",
timestamp: "2 mins ago",
ip: "127.0.0.1",
badge: "SECURITY",
icon: "ShieldAlert"
},
{
id: "act-3",
type: "WORKSPACE_SYNC",
title: "Security Workspace Handshake",
description: "Role mappings verified: ROLE_ADMIN, WORKSPACE_MANAGER",
timestamp: "12 mins ago",
ip: "10.0.2.15",
badge: "INFO",
icon: "CheckCircle"
},
{
id: "act-4",
type: "OTP_VERIFIED",
title: "Email Verification Completed",
description: "Two-step OTP challenge validated successfully",
timestamp: "1 hour ago",
ip: "192.168.1.104",
badge: "VERIFIED",
icon: "MailCheck"
}
];