Skip to content

Commit

Permalink
refactor(service): users/auth: remove unused types
Browse files Browse the repository at this point in the history
  • Loading branch information
restjohn committed Oct 29, 2024
1 parent f5830a8 commit 29db301
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions service/src/ingress/ingress.app.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { MageEventId } from '../entities/events/entities.events'
import { Team, TeamId } from '../entities/teams/entities.teams'
import { User, UserId, UserRepository, UserRepositoryError } from '../entities/users/entities.users'
import { AdmitFromIdentityProviderOperation, AdmitFromIdentityProviderRequest, authenticationFailedError, EnrollMyselfOperation, EnrollMyselfRequest } from './ingress.app.api'
import { createEnrollmentCandidateUser, IdentityProvider, IdentityProviderRepository, IdentityProviderUser, UserIngressBinding, UserIngressBindingRepository, UserIngressBindings } from './ingress.entities'
import { createEnrollmentCandidateUser, IdentityProvider, IdentityProviderRepository, IdentityProviderUser, UserIngressBindingRepository, UserIngressBindings } from './ingress.entities'
import { LocalIdpCreateAccountOperation } from './local-idp.app.api'
import { JWTService, TokenAssertion } from './verification'

Expand Down Expand Up @@ -40,13 +40,6 @@ export interface FindEventTeam {
(mageEventId: MageEventId): Promise<Team | null>
}

type TeamAssignmentResult = { teamId: TeamId, assigned: boolean }
type EventAssignmentResult = { eventId: MageEventId, teamId: TeamId | null, assigned: boolean }
type EnrollmentTeamAssignmentResult = {
teamAssignments: TeamAssignmentResult[]
eventAssignments: EventAssignmentResult[]
}

async function enrollNewUser(idpAccount: IdentityProviderUser, idp: IdentityProvider, userRepo: UserRepository, ingressBindingRepo: UserIngressBindingRepository, findEventTeam: FindEventTeam, assignTeamMember: AssignTeamMember): Promise<{ mageAccount: User, ingressBindings: UserIngressBindings }> {
console.info(`enrolling new user account ${idpAccount.username} from identity provider ${idp.name}`)
const candidate = createEnrollmentCandidateUser(idpAccount, idp)
Expand Down

0 comments on commit 29db301

Please sign in to comment.