Skip to content

Commit b9cfc79

Browse files
authored
Merge pull request #1169 from 123niel/main
Fix #1168 userInfoEndpoint Typo
2 parents 15335bb + 6184421 commit b9cfc79

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

projects/angular-auth-oidc-client/src/lib/config/auth-well-known/auth-well-known-data.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class AuthWellKnownDataService {
1919
jwksUri: wellKnownEndpoints.jwks_uri,
2020
authorizationEndpoint: wellKnownEndpoints.authorization_endpoint,
2121
tokenEndpoint: wellKnownEndpoints.token_endpoint,
22-
userinfoEndpoint: wellKnownEndpoints.userinfo_endpoint,
22+
userInfoEndpoint: wellKnownEndpoints.userinfo_endpoint,
2323
endSessionEndpoint: wellKnownEndpoints.end_session_endpoint,
2424
checkSessionIframe: wellKnownEndpoints.check_session_iframe,
2525
revocationEndpoint: wellKnownEndpoints.revocation_endpoint,

projects/angular-auth-oidc-client/src/lib/userData/user-service.spec.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ describe('User Service', () => {
444444
spyOn(configProvider, 'getOpenIDConfiguration').and.returnValue({ configId: 'configId' });
445445
const serviceAsAny = userService as any;
446446
spyOn(storagePersistenceService, 'getAccessToken').and.returnValue('accessToken');
447-
spyOn(storagePersistenceService, 'read').withArgs('authWellKnownEndPoints', 'configId').and.returnValue({ userinfoEndpoint: null });
447+
spyOn(storagePersistenceService, 'read').withArgs('authWellKnownEndPoints', 'configId').and.returnValue({ userInfoEndpoint: null });
448448
serviceAsAny.getIdentityUserData('configId').subscribe({
449449
error: (err) => {
450450
expect(err).toBeTruthy();
@@ -454,17 +454,17 @@ describe('User Service', () => {
454454
);
455455

456456
it(
457-
'gets userData if authwell and userinfoEndpoint is set',
457+
'gets userData if authwell and userInfoEndpoint is set',
458458
waitForAsync(() => {
459459
spyOn(configProvider, 'getOpenIDConfiguration').and.returnValue({ configId: 'configId' });
460460
const serviceAsAny = userService as any;
461461
const spy = spyOn(dataService, 'get').and.returnValue(of({}));
462462
spyOn(storagePersistenceService, 'getAccessToken').and.returnValue('accessToken');
463463
spyOn(storagePersistenceService, 'read')
464464
.withArgs('authWellKnownEndPoints', 'configId')
465-
.and.returnValue({ userinfoEndpoint: 'userinfoEndpoint' });
465+
.and.returnValue({ userInfoEndpoint: 'userInfoEndpoint' });
466466
serviceAsAny.getIdentityUserData('configId').subscribe(() => {
467-
expect(spy).toHaveBeenCalledWith('userinfoEndpoint', 'configId', 'accessToken');
467+
expect(spy).toHaveBeenCalledWith('userInfoEndpoint', 'configId', 'accessToken');
468468
});
469469
})
470470
);
@@ -476,7 +476,7 @@ describe('User Service', () => {
476476
spyOn(storagePersistenceService, 'getAccessToken').and.returnValue('accessToken');
477477
spyOn(storagePersistenceService, 'read')
478478
.withArgs('authWellKnownEndPoints', 'configId')
479-
.and.returnValue({ userinfoEndpoint: 'userinfoEndpoint' });
479+
.and.returnValue({ userInfoEndpoint: 'userInfoEndpoint' });
480480
spyOn(dataService, 'get').and.returnValue(createRetriableStream(throwError({}), of(DUMMY_USER_DATA)));
481481

482482
(userService as any).getIdentityUserData('configId').subscribe({
@@ -495,7 +495,7 @@ describe('User Service', () => {
495495
spyOn(storagePersistenceService, 'getAccessToken').and.returnValue('accessToken');
496496
spyOn(storagePersistenceService, 'read')
497497
.withArgs('authWellKnownEndPoints', 'configId')
498-
.and.returnValue({ userinfoEndpoint: 'userinfoEndpoint' });
498+
.and.returnValue({ userInfoEndpoint: 'userInfoEndpoint' });
499499
spyOn(dataService, 'get').and.returnValue(createRetriableStream(throwError({}), throwError({}), of(DUMMY_USER_DATA)));
500500

501501
(userService as any).getIdentityUserData('configId').subscribe({
@@ -513,7 +513,7 @@ describe('User Service', () => {
513513
spyOn(storagePersistenceService, 'getAccessToken').and.returnValue('accessToken');
514514
spyOn(storagePersistenceService, 'read')
515515
.withArgs('authWellKnownEndPoints', 'configId')
516-
.and.returnValue({ userinfoEndpoint: 'userinfoEndpoint' });
516+
.and.returnValue({ userInfoEndpoint: 'userInfoEndpoint' });
517517
spyOn(dataService, 'get').and.returnValue(createRetriableStream(throwError({}), throwError({}), throwError({}), of(DUMMY_USER_DATA)));
518518

519519
(userService as any).getIdentityUserData('configId').subscribe({

projects/angular-auth-oidc-client/src/lib/userData/user.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export class UserService {
120120
return throwError('authWellKnownEndpoints is undefined');
121121
}
122122

123-
const userInfoEndpoint = authWellKnownEndPoints.userinfoEndpoint;
123+
const userInfoEndpoint = authWellKnownEndPoints.userInfoEndpoint;
124124

125125
if (!userInfoEndpoint) {
126126
this.loggerService.logError(

0 commit comments

Comments
 (0)