fix openid connection redirect
This commit is contained in:
parent
edac97ec8e
commit
77587b5194
@ -53,7 +53,7 @@ export class EditierenComponent implements OnInit {
|
||||
}
|
||||
|
||||
public loadFeed(id) {
|
||||
this.http.get('http://' + environment.location + ':' + environment.port + '/feeds/' + id + '/').subscribe(
|
||||
this.http.get('http://' + environment.location + ':' + environment.port_be + '/feeds/' + id + '/').subscribe(
|
||||
(data: any) => {
|
||||
this.url = data.url;
|
||||
this.active = data.active;
|
||||
@ -86,7 +86,7 @@ export class EditierenComponent implements OnInit {
|
||||
form.append('icon', feedData.icon._files['0']);
|
||||
}
|
||||
if (this.id == null) {
|
||||
this.http.post('http://' + environment.location + ':' + environment.port + '/feeds/', form).subscribe(
|
||||
this.http.post('http://' + environment.location + ':' + environment.port_be + '/feeds/', form).subscribe(
|
||||
() => {
|
||||
this._snackbar.open('Feed erfolgreich gespeichert!', 'Schließen', {duration: 3000});
|
||||
},
|
||||
@ -97,7 +97,7 @@ export class EditierenComponent implements OnInit {
|
||||
}
|
||||
);
|
||||
} else {
|
||||
this.http.put('http://' + environment.location + ':' + environment.port + '/feeds/' + this.id + '/', form).subscribe(
|
||||
this.http.put('http://' + environment.location + ':' + environment.port_be + '/feeds/' + this.id + '/', form).subscribe(
|
||||
() => {
|
||||
this._snackbar.open('Feed erfolgreich gespeichert!', 'Schließen', {duration: 3000});
|
||||
},
|
||||
|
||||
@ -35,7 +35,7 @@ export class EinstellungenComponent implements OnInit {
|
||||
}
|
||||
|
||||
deleteFeed(id: number) {
|
||||
this.http.delete('http://' + environment.location + ':' + environment.port + '/feeds/' + id + '/').subscribe(
|
||||
this.http.delete('http://' + environment.location + ':' + environment.port_be + '/feeds/' + id + '/').subscribe(
|
||||
() => {
|
||||
this._snackbar.open('Feed erfolgreich gelöscht!', 'Schließen', {duration: 3000});
|
||||
this.feeds = this.feeds.filter(feed => feed.id !== id);
|
||||
|
||||
@ -62,7 +62,7 @@ export class LoginComponent implements OnInit {
|
||||
'client_id=waecm' +
|
||||
'&response_type=id_token' +
|
||||
'&prompt=consent' +
|
||||
'&redirect_uri=http://' + environment.location + ':' + environment.port +
|
||||
'&redirect_uri=http://' + environment.location + ':' + environment.port_fe +
|
||||
'&scope=openid%20profile' +
|
||||
'&nonce=' + nonce;
|
||||
window.location.replace(url);
|
||||
|
||||
@ -45,7 +45,7 @@ export class TweetsComponent implements OnInit {
|
||||
console.log(this.tweets);
|
||||
|
||||
this.http.get<Tweet[]>(
|
||||
'http://' + environment.location + ':' + environment.port + '/getMoreTweets/' + this.tweets[this.tweets.length - 1].tweet_id + '/'
|
||||
'http://' + environment.location + ':' + environment.port_be + '/getMoreTweets/' + this.tweets[this.tweets.length - 1].tweet_id + '/'
|
||||
).subscribe(data => {
|
||||
console.log(data);
|
||||
|
||||
@ -66,7 +66,7 @@ export class TweetsComponent implements OnInit {
|
||||
|
||||
fillTweets() {
|
||||
|
||||
this.http.get<Tweet[]>('http://' + environment.location + ':' + environment.port + '/getSixTweets/').subscribe(data => {
|
||||
this.http.get<Tweet[]>('http://' + environment.location + ':' + environment.port_be + '/getSixTweets/').subscribe(data => {
|
||||
console.log(data);
|
||||
for (const tweet of data) {
|
||||
const position = tweet.text.search(': http');
|
||||
|
||||
@ -9,7 +9,7 @@ import {environment} from '../../environments/environment';
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class FeedService {
|
||||
private url = 'http://' + environment.location + ':' + environment.port + '/feeds/';
|
||||
private url = 'http://' + environment.location + ':' + environment.port_be + '/feeds/';
|
||||
|
||||
constructor(private http: HttpClient) {}
|
||||
|
||||
|
||||
@ -6,7 +6,7 @@ import {Observable} from 'rxjs';
|
||||
|
||||
@Injectable()
|
||||
export class RestService {
|
||||
private currentLocation = 'http://' + environment.location + ':' + environment.port + '/';
|
||||
private currentLocation = 'http://' + environment.location + ':' + environment.port_be + '/';
|
||||
|
||||
constructor(
|
||||
private logger: NGXLogger,
|
||||
|
||||
@ -3,11 +3,11 @@ import {Injectable} from '@angular/core';
|
||||
import {NGXLogger} from 'ngx-logger';
|
||||
import {environment} from '../../environments/environment';
|
||||
import {Observable} from 'rxjs';
|
||||
import {Tweet} from "../interfaces/interface";
|
||||
import {Tweet} from '../interfaces/interface';
|
||||
|
||||
@Injectable()
|
||||
export class TwitterService {
|
||||
private currentLocation = 'http://' + environment.location + ':' + environment.port + '/';
|
||||
private currentLocation = 'http://' + environment.location + ':' + environment.port_be + '/';
|
||||
|
||||
constructor(
|
||||
private logger: NGXLogger,
|
||||
|
||||
@ -5,7 +5,8 @@ export const environment = {
|
||||
openid_endpoint: 'https://waecm-sso.inso.tuwien.ac.at/auth/realms/waecm/protocol/openid-connect',
|
||||
production: true,
|
||||
location: window.location.hostname,
|
||||
port: 8000,
|
||||
port_be: 8000,
|
||||
port_fe: 4200,
|
||||
log_level: NgxLoggerLevel.WARN,
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user