Skip to content

Commit

Permalink
add to test payload
Browse files Browse the repository at this point in the history
  • Loading branch information
magnearun committed Jan 17, 2025
1 parent 3024ecc commit 9587a64
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libs/auth-nest-tools/src/lib/jwt.strategy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ describe('JwtStrategy#validate', () => {
nationalId: '1234567890',
scope: ['test-scope-1'],
client_id: 'test-client',
sub: 'sub',
sid: 'sid',
delegationType: [AuthDelegationType.Custom],
actor: {
nationalId: '1234565555',
Expand Down Expand Up @@ -122,6 +124,8 @@ describe('JwtStrategy#validate', () => {
nationalId: '1234567890',
scope: ['test-scope-1'],
client_id: 'test-client',
sid: 'sid',
sub: 'sub',
}
const request = {
headers: {
Expand Down Expand Up @@ -151,6 +155,8 @@ describe('JwtStrategy#validate', () => {
nationalId: '1234564321',
scope: ['test-scope-2'],
},
sid: 'sid',
sub: 'sub',
}

// Act
Expand All @@ -172,12 +178,16 @@ describe('JwtStrategy#validate', () => {
scope: ['test-scope-1'],
client_id: 'test-client',
client_nationalId: '1234565555',
sid: 'sid',
sub: 'sub',
}

const personPayload: JwtPayload = {
scope: ['test-scope-1'],
client_id: 'test-client',
nationalId: '1234567890',
sub: 'sub',
sid: 'sid',
}

// Act
Expand Down

0 comments on commit 9587a64

Please sign in to comment.