Skip to content

Commit

Permalink
N21-1219 adds adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
arnegns committed Nov 1, 2023
1 parent 1f4fc89 commit c5af33e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,16 +219,6 @@ describe('CurrentUserMapper', () => {
impersonated: jwtPayload.support,
});
});

/* it('should return current user with default for isExternalUser', () => {
const { jwtPayload } = setup();
const currentUser = CurrentUserMapper.jwtToICurrentUser(jwtPayload);
expect(currentUser).toMatchObject({
isExternalUser: jwtPayload.isExternalUser,
});
}); */
});

describe('when JWT is provided without optional claims', () => {
Expand All @@ -238,7 +228,6 @@ describe('CurrentUserMapper', () => {
roles: ['mockRoleId'],
schoolId: 'dummySchoolId',
userId: 'dummyUserId',
// isExternalUser: false,
sub: 'dummyAccountId',
jti: 'random string',
aud: 'some audience',
Expand All @@ -264,16 +253,6 @@ describe('CurrentUserMapper', () => {
userId: jwtPayload.userId,
});
});

/* it('should return current user with default for isExternalUser', () => {
const { jwtPayload } = setup();
const currentUser = CurrentUserMapper.jwtToICurrentUser(jwtPayload);
expect(currentUser).toMatchObject({
isExternalUser: false,
});
}); */
});
});

Expand Down
3 changes: 0 additions & 3 deletions apps/server/src/modules/oauth/uc/oauth.uc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ export class OauthUc {
return authenticationUrl;
}

/**
* @deprecated Please use the oauth2 strategy instead.
*/
async processOAuthLogin(cachedState: OauthLoginStateDto, code?: string, error?: string): Promise<OAuthProcessDto> {
const { state, systemId, postLoginRedirect, userLoginMigration } = cachedState;

Expand Down
13 changes: 6 additions & 7 deletions apps/server/src/modules/user/service/user.service.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import { ConfigService } from '@nestjs/config';
import { EntityId, IFindOptions, LanguageType, User } from '@shared/domain';
import { RoleReference, Page, UserDO } from '@shared/domain/domainobject';
import { UserRepo } from '@shared/repo';
import { UserDORepo } from '@shared/repo/user/user-do.repo';
import { AccountService } from '@modules/account';
import { AccountDto } from '@modules/account/services/dto';
import { ICurrentUser } from '@modules/authentication';
// invalid import
import { CurrentUserMapper } from '@modules/authentication/mapper';
import { RoleDto } from '@modules/role/service/dto/role.dto';
import { RoleService } from '@modules/role/service/role.service';
import { BadRequestException, Injectable } from '@nestjs/common';
import { OauthCurrentUser } from '../../authentication/interface';
import { ConfigService } from '@nestjs/config';
import { EntityId, IFindOptions, LanguageType, User } from '@shared/domain';
import { Page, RoleReference, UserDO } from '@shared/domain/domainobject';
import { UserRepo } from '@shared/repo';
import { UserDORepo } from '@shared/repo/user/user-do.repo';
import { OauthCurrentUser } from '@modules/authentication/interface';
import { IUserConfig } from '../interfaces';
import { UserMapper } from '../mapper/user.mapper';
import { UserDto } from '../uc/dto/user.dto';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ describe('VideoConferenceUc', () => {
roles: [],
schoolId: 'schoolId',
accountId: 'accountId',
isExternalUser: false,
};
defaultOptions = {
everybodyJoinsAsModerator: false,
Expand Down

0 comments on commit c5af33e

Please sign in to comment.