fleet/frontend/test/stubs.ts
Gabriel Hernandez 084ebe6e16 update auth token storage (#40504)
**Related issue:** Resolves #14401

this updates the mechanism of storing the auth token for a user that is
used for making requests and validating a user session. We change the
storage from local storage to a cookie. This allow a bit more security
and prepares for a future change where we will allow the browser to
handle setting and passing the auth token in the request.

- [x] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
- [x] QA'd all new/changed functionality manually
2026-02-27 12:36:42 -06:00

33 lines
639 B
TypeScript

import { IUser } from "interfaces/user";
import { ITeam } from "interfaces/team";
export const teamStub: ITeam = {
description: "This is the test team",
host_count: 10,
id: 1,
name: "Test Team",
user_count: 5,
};
export const userTeamStub: ITeam = {
...teamStub,
role: "observer",
};
export const userStub: IUser = {
id: 1,
name: "Gnar Mike",
email: "hi@gnar.dog",
role: "Observer",
global_role: null,
api_only: false,
force_password_reset: false,
gravatar_url: "https://image.com",
sso_enabled: false,
teams: [{ ...userTeamStub }],
fleets: [{ ...userTeamStub }],
};
export default {
userStub,
};