Skip to content

Commit 4d27eb6

Browse files
committed
remove unused
1 parent dfb3eb4 commit 4d27eb6

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed
Binary file not shown.

Solution 6 - OIDC and Angular client/ClientNgApp/ClientApp/src/app/core/auth.service.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,13 @@ export class AuthService implements OnInit, OnDestroy {
6767

6868
private doCallbackLogicIfRequired() {
6969

70-
if (window.location.hash) {
71-
window.location.hash = decodeURIComponent(window.location.hash);
72-
// authorizedCallback returns wrong result when hash is URI encoded
73-
this.oidcSecurityService.authorizedCallback();
74-
} else {
75-
this.oidcSecurityService.authorizedCallback();
76-
77-
this.oidcSecurityService.authorize();
70+
if (window.location.hash) {
71+
window.location.hash = decodeURIComponent(window.location.hash);
72+
// authorizedCallback returns wrong result when hash is URI encoded
73+
this.oidcSecurityService.authorizedCallback();
74+
} else {
75+
76+
this.oidcSecurityService.authorize();
7877
}
7978
//if (typeof location !== "undefined") {
8079
// this.oidcSecurityService.authorizedCallback();
@@ -119,6 +118,11 @@ export class AuthService implements OnInit, OnDestroy {
119118
return this.appendAuthHeader(headers);
120119
}
121120

121+
public getToken() {
122+
const token = this.oidcSecurityService.getToken();
123+
return token;
124+
}
125+
122126
private appendAuthHeader(headers: HttpHeaders) {
123127
const token = this.oidcSecurityService.getToken();
124128

Solution 6 - OIDC and Angular client/ClientNgApp/ClientApp/src/app/fetch-data/fetch-data.component.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ export class FetchDataComponent {
1616
}, (error) => {
1717
console.error(error);
1818
});
19-
20-
//http.get<WeatherForecast[]>(baseUrl + 'api/SampleData/WeatherForecasts').subscribe(result => {
21-
// this.forecasts = result;
22-
//}, error => console.error(error));
2319
}
2420
}
2521

0 commit comments

Comments
 (0)