Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
fix(token): add check for local dev api url
Browse files Browse the repository at this point in the history
  • Loading branch information
sbose78 authored and joshuawilson committed Nov 6, 2017
1 parent f3a8f44 commit 586139b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/auth/authentication.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class AuthenticationService {

// ensure nothing breaks even if the corresponding changes in fabric8-ui/fabric8-ui
// are not merged when this is released.
if ( this.apiUrl.startsWith("https://api.") ){
if ( this.apiUrl.startsWith("https://api.") || this.apiUrl.startsWith("http://localhost:8080") ){
// keep the old one.
refreshTokenUrl = this.apiUrl + 'login/refresh';
}
Expand Down Expand Up @@ -166,7 +166,7 @@ export class AuthenticationService {
let res = this.refreshTokens.switchMap(token => {
let headers = new Headers({ 'Content-Type': 'application/json' });
let tokenUrl = this.ssoUrl + `auth/realms/${this.realm}/broker/${broker}/token`;
if ( broker == this.github && !this.apiUrl.startsWith("https://api.") ){
if ( broker == this.github && !this.apiUrl.startsWith("https://api.") && !this.apiUrl.startsWith("http://localhost:8080") ){
// the second condition ensures that if this commit moves to master
// nothing breaks even if the corresponding changes in fabric8-ui/fabric8-ui are
// yet to be merged.
Expand Down

0 comments on commit 586139b

Please sign in to comment.