Merge branch 'ui-refactoring' of https://gitlab.eudat.eu/dmp/OpenAIRE-EUDAT-DMP-service-pilot into ui-refactoring

This commit is contained in:
Diamantis Tziotzios 2019-02-13 15:50:18 +02:00
commit 89e13b2e03
7 changed files with 33 additions and 12 deletions

View File

@ -17,4 +17,20 @@ pdf.converter.url=http://localhost:88/
####################CONFIGURATION FILES OVERRIDES CONFIGURATIONS##########
configuration.externalUrls=/tmp/ExternalUrls.xml
configuration.dynamicProjectUrl=/tmp/ProjectConfiguration.xml
configuration.h2020template=C:\\Users\\ikalyvas\\Documents\\OpenAIRE-EUDAT-DMP-service-pilot\\dmp-backend\\web\\src\\main\\resources\\documents\\h2020.docx
configuration.h2020template=C:\\Users\\gkolokythas\\Documents\\OpenAIRE-EUDAT-DMP-service-pilot\\dmp-backend\\web\\src\\main\\resources\\documents\\h2020.docx
#############TWITTER LOGIN CONFIGURATIONS#########
twitter.login.redirect_uri=http://127.0.0.1:4200/login/twitter
#############LINKEDIN LOGIN CONFIGURATIONS#########
linkedin.login.redirect_uri=http://localhost:4200/login/linkedin
#############FACEBOOK LOGIN CONFIGURATIONS#########
facebook.login.clientId=613977555670785
facebook.login.clientSecret=b656eb30077454dea7b3cfd03b6e4310
facebook.login.namespace=opendmp
#############B2 ACCESS CONFIGURATIONS#########
b2access.externallogin.user_info_url=https://b2access-integration.fz-juelich.de:443/oauth2/userinfo
b2access.externallogin.access_token_url=https://b2access-integration.fz-juelich.de:443/oauth2/token
b2access.externallogin.redirect_uri=http://opendmp.eu/api/oauth/authorized/b2access

View File

@ -1,5 +1,6 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { B2AccessLoginComponent } from './ui/auth/login/b2access/b2access-login.component';
const appRoutes: Routes = [
{
@ -94,12 +95,12 @@ const appRoutes: Routes = [
breadcrumb: true
},
},
// {
// path: 'api/oauth/authorized/b2access',
// component: B2AccessLoginComponent,
// data: {
// },
// }
{
path: 'api/oauth/authorized/b2access',
component: B2AccessLoginComponent,
data: {
},
}
];
@NgModule({

View File

@ -18,6 +18,7 @@ import { NotificationModule } from './library/notification/notification.module';
import { BreadcrumbModule } from './ui/misc/breadcrumb/breadcrumb.module';
import { HelpContentModule } from './ui/misc/help-content/help-content.module';
import { NavigationModule } from './ui/misc/navigation/navigation.module';
import { LoginModule } from './ui/auth/login/login.module';
// AoT requires an exported function for factories
export function HttpLoaderFactory(http: HttpClient) {
@ -42,6 +43,7 @@ export function HttpLoaderFactory(http: HttpClient) {
OverlayModule,
CommonHttpModule,
MatMomentDateModule,
LoginModule,
//Ui
NotificationModule,
NavigationModule,

View File

@ -5,7 +5,7 @@
<h4>Login</h4>
<div class="social-btns">
<button *ngIf="hasGoogleOauth()" mat-icon-button id="googleSignInButton">
<i class="fa fa-google-plus"></i>
<i class="fa fa-google"></i>
</button>
<button *ngIf="hasLinkedInOauth()" mat-icon-button>
<i class="fa fa-linkedin" (click)="linkedInLogin()"></i>

View File

@ -6,6 +6,7 @@ import { LoginComponent } from './login.component';
import { LoginRoutingModule } from './login.routing';
import { TwitterLoginComponent } from './twitter-login/twitter-login.component';
import { LoginService } from './utilities/login.service';
import { B2AccessLoginComponent } from './b2access/b2access-login.component';
@NgModule({
imports: [
@ -17,6 +18,7 @@ import { LoginService } from './utilities/login.service';
LoginComponent,
LinkedInLoginComponent,
TwitterLoginComponent,
B2AccessLoginComponent
],
providers: [LoginService]
})

View File

@ -43,7 +43,7 @@ export class TwitterLoginComponent extends BaseComponent implements OnInit {
this.httpClient.get(environment.Server + 'auth/twitterRequestToken', { headers: headers })
.pipe(takeUntil(this._destroyed))
.subscribe((data: any) => {
window.location.href = environment.loginProviders.twitterConfiguration.oauthUrl + '?oauth_token=' + data.payload.value;
window.location.href = environment.loginProviders.twitterConfiguration.oauthUrl + '?oauth_token=' + data.value;
});
}

View File

@ -8,8 +8,8 @@ export const environment = {
},
defaultCulture: 'en-US',
loginProviders: {
enabled: [1, 2, 3, 4, 5],
facebookConfiguration: { clientId: '110586756143149' },
enabled: [1, 2, 3, 4, 5, 6],
facebookConfiguration: { clientId: '613977555670785' },
googleConfiguration: { clientId: '524432312250-sc9qsmtmbvlv05r44onl6l93ia3k9deo.apps.googleusercontent.com' },
linkedInConfiguration: {
clientId: '86bl8vfk77clh9',