Skip to content

feat: token generation and SSO integration MAPCO-8122 AND MAPCO-8121#79

Merged
CptSchnitz merged 8 commits into
masterfrom
token-kiosk
Jul 5, 2025
Merged

feat: token generation and SSO integration MAPCO-8122 AND MAPCO-8121#79
CptSchnitz merged 8 commits into
masterfrom
token-kiosk

Conversation

@CptSchnitz
Copy link
Copy Markdown
Contributor

image

Implemented so far:

  • authentication
  • token generation

not implemented:

  • Database integration
  • Config integration
  • tests
  • ui

@CptSchnitz CptSchnitz requested review from Copilot and netanelC July 2, 2025 07:54
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR bootstraps the Token Kiosk service by implementing authentication, token generation, a React/Vite UI, testing configurations, and Helm deployment.

  • Added Vitest and Vite configurations for unit/integration testing and UI proxy
  • Implemented React UI boilerplate (main.tsx, App.tsx) and styling
  • Built backend token generation, DI container, server builder, OpenAPI routes, and Helm charts

Reviewed Changes

Copilot reviewed 60 out of 67 changed files in this pull request and generated 2 comments.

File Description
packages/token-kiosk/ui/src/App.tsx Main React component with duplicate interface
packages/token-kiosk/src/containerConfig.ts DI registration for onSignal shows nested value
packages/token-kiosk/tests/unit/...Manager.spec.ts Unit tests with mismatched describe titles
Comments suppressed due to low confidence (2)

packages/token-kiosk/tests/unit/resourceName/models/resourceNameModel.spec.ts:7

  • [nitpick] The describe block title 'ResourceNameManager' does not match the tested TokenManager class; update it to 'TokenManager'.
describe('ResourceNameManager', () => {

packages/token-kiosk/tests/unit/anotherResource/models/anotherResourceManager.spec.ts:7

  • [nitpick] The describe block title should match the tested AnotherResourceManager class; update it accordingly.
describe('ResourceNameManager', () => {

Comment on lines +20 to +34
/**
* User information interface matching the OpenAPI schema
*/
interface UserInfo {
readonly sub: string;
readonly name?: string;
readonly givenName?: string;
readonly familyName?: string;
readonly middleName?: string;
readonly nickname?: string;
readonly preferredUsername?: string;
readonly email?: string;
readonly gender?: string;
readonly phoneNumber?: string;
}
Copy link

Copilot AI Jul 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The UserInfo interface is declared twice; remove the duplicate declaration to avoid confusion.

Suggested change
/**
* User information interface matching the OpenAPI schema
*/
interface UserInfo {
readonly sub: string;
readonly name?: string;
readonly givenName?: string;
readonly familyName?: string;
readonly middleName?: string;
readonly nickname?: string;
readonly preferredUsername?: string;
readonly email?: string;
readonly gender?: string;
readonly phoneNumber?: string;
}
// Removed duplicate UserInfo interface declaration

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +44
useValue: {
useValue: async (): Promise<void> => {
await Promise.all([getTracing().stop()]);
},
Copy link

Copilot AI Jul 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provider for 'onSignal' has a nested useValue property, causing confusion in DI registration; it should directly supply the function without the extra useValue wrapper.

Suggested change
useValue: {
useValue: async (): Promise<void> => {
await Promise.all([getTracing().stop()]);
},
useValue: async (): Promise<void> => {
await Promise.all([getTracing().stop()]);

Copilot uses AI. Check for mistakes.
@CptSchnitz CptSchnitz changed the title Token kiosk feat: token generation and SSO integration MAPCO-8122 AND MAPCO-8121 Jul 2, 2025
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jul 2, 2025

🎫 Related Jira Issue: MAPCO-8122

@netanelC netanelC assigned netanelC and CptSchnitz and unassigned netanelC Jul 3, 2025
Copy link
Copy Markdown
Contributor

@netanelC netanelC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't review tests and ui folders


export type TokenResponse = components['schemas']['tokenResponse'];

export type TokenCache = Cache & {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export type TokenCache = Cache & {
type TokenCache = Cache & {

import type { components as authManagerComponents } from '@src/auth-manager';
import type { AuthManagerClient } from './authManagerClient';

export type TokenResponse = components['schemas']['tokenResponse'];
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export type TokenResponse = components['schemas']['tokenResponse'];
type TokenResponse = components['schemas']['tokenResponse'];

@CptSchnitz CptSchnitz merged commit f17ac4f into master Jul 5, 2025
13 checks passed
@CptSchnitz CptSchnitz deleted the token-kiosk branch July 5, 2025 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants