+
+
diff --git a/dmp-frontend/src/app/ui/auth/login/login.component.scss b/dmp-frontend/src/app/ui/auth/login/login.component.scss
index 6756da047..8238f27d6 100644
--- a/dmp-frontend/src/app/ui/auth/login/login.component.scss
+++ b/dmp-frontend/src/app/ui/auth/login/login.component.scss
@@ -294,8 +294,9 @@ span.iconmedium {
span.configurableIcon {
float: right;
- width: 80px;
- height: 56px;
+ transform: scale(0.85);
+ width: 50px;
+ height: 50px;
}
span.zenodoIcon {
diff --git a/dmp-frontend/src/app/ui/auth/login/login.module.ts b/dmp-frontend/src/app/ui/auth/login/login.module.ts
index 1872a0035..1feb4f4dc 100644
--- a/dmp-frontend/src/app/ui/auth/login/login.module.ts
+++ b/dmp-frontend/src/app/ui/auth/login/login.module.ts
@@ -16,6 +16,8 @@ import { CommonUiModule } from '@common/ui/common-ui.module';
import { MergeEmailConfirmation } from './merge-email-confirmation/merge-email-confirmation.component';
import { MergeLoginService } from './utilities/merge-login.service';
import { ZenodoLoginComponent } from './zenodo-login/zenodo-login.component';
+import { SamlLoginService } from '@app/core/services/saml-login.service';
+import { SamlResponseLoginComponent } from './saml/saml-login-response/saml-login-response.component';
@NgModule({
imports: [
@@ -34,11 +36,12 @@ import { ZenodoLoginComponent } from './zenodo-login/zenodo-login.component';
OpenAireLoginComponent,
ConfigurableLoginComponent,
ZenodoLoginComponent,
- MergeEmailConfirmation
+ MergeEmailConfirmation,
+ SamlResponseLoginComponent
],
exports: [
LoginComponent
],
- providers: [LoginService, MergeLoginService, ConfigurableProvidersService]
+ providers: [LoginService, MergeLoginService, ConfigurableProvidersService, SamlLoginService]
})
export class LoginModule { }
diff --git a/dmp-frontend/src/app/ui/auth/login/login.routing.ts b/dmp-frontend/src/app/ui/auth/login/login.routing.ts
index f6e8070f6..68fc9e558 100644
--- a/dmp-frontend/src/app/ui/auth/login/login.routing.ts
+++ b/dmp-frontend/src/app/ui/auth/login/login.routing.ts
@@ -11,6 +11,7 @@ import { ConfigurableLoginComponent } from "./configurable-login/configurable-lo
import { ZenodoLoginComponent } from './zenodo-login/zenodo-login.component';
import { Oauth2DialogComponent } from '@app/ui/misc/oauth2-dialog/oauth2-dialog.component';
import { MergeEmailConfirmation } from './merge-email-confirmation/merge-email-confirmation.component';
+import { SamlResponseLoginComponent } from './saml/saml-login-response/saml-login-response.component';
const routes: Routes = [
{ path: '', component: LoginComponent },
@@ -23,7 +24,8 @@ const routes: Routes = [
{ path: 'confirmation', component: EmailConfirmation },
{ path: 'openaire', component: Oauth2DialogComponent},
{ path: 'configurable/:id', component: ConfigurableLoginComponent},
- { path: 'external/zenodo', component: Oauth2DialogComponent }
+ { path: 'external/zenodo', component: Oauth2DialogComponent },
+ { path: 'external/saml', component: SamlResponseLoginComponent }
];
@NgModule({
diff --git a/dmp-frontend/src/app/ui/auth/login/saml/saml-login-response/saml-login-response.component.ts b/dmp-frontend/src/app/ui/auth/login/saml/saml-login-response/saml-login-response.component.ts
new file mode 100644
index 000000000..83d5f29f5
--- /dev/null
+++ b/dmp-frontend/src/app/ui/auth/login/saml/saml-login-response/saml-login-response.component.ts
@@ -0,0 +1,68 @@
+import { HttpErrorResponse } from '@angular/common/http';
+import { Component, NgZone, OnInit } from '@angular/core';
+import { ActivatedRoute, Router } from '@angular/router';
+import { BaseComponent } from '@common/base/base.component';
+import { LoggingService } from '@app/core/services/logging/logging-service';
+import { SamlLoginService } from '@app/core/services/saml-login.service';
+import { TranslateService } from '@ngx-translate/core';
+import { takeUntil } from 'rxjs/operators';
+import { AuthService } from '@app/core/services/auth/auth.service';
+import { AuthProvider } from '@app/core/common/enum/auth-provider';
+import { SnackBarNotificationLevel, UiNotificationService } from '@app/core/services/notification/ui-notification-service';
+
+@Component({
+ template: ''
+})
+export class SamlResponseLoginComponent extends BaseComponent implements OnInit {
+
+ constructor(
+ private route: ActivatedRoute,
+ private samlLoginService: SamlLoginService,
+ private router: Router,
+ private uiNotificationService: UiNotificationService,
+ private loggingService: LoggingService,
+ private zone: NgZone,
+ private language: TranslateService,
+ private authService: AuthService,
+ ) { super(); }
+
+ ngOnInit() {
+ this.route.queryParams
+ .pipe(takeUntil(this._destroyed))
+ .subscribe(routeParams => {
+ let samlResponse = null;
+ if (routeParams.SAMLart) {
+ samlResponse = routeParams.SAMLart;
+ } else if (routeParams.SAMLResponse) {
+ samlResponse = routeParams.SAMLResponse;
+ }
+ else if(routeParams.token){
+ this.authService.getUserFromToken(routeParams.token).pipe(takeUntil(this._destroyed))
+ .subscribe((result) => this.onAuthenticateSuccess(), (error) => this.onAuthenticateError(error));
+ return;
+ }
+
+ if (samlResponse == null) this.router.navigate(['/login']);
+
+ const spId = this.samlLoginService.resolveSpId(routeParams.RelayState);
+ const configurableLoginId = this.samlLoginService.resolveConfigurableLoginId(routeParams.RelayState);
+
+ this.authService.login({ ticket: samlResponse, provider: AuthProvider.Configurable, data: { configurableLoginId: configurableLoginId } })
+ .pipe(takeUntil(this._destroyed))
+ .subscribe((result) => this.onAuthenticateSuccess(), (error) => this.onAuthenticateError(error));
+
+ });
+ }
+
+ onAuthenticateSuccess(): void {
+ this.loggingService.info('Successful Login');
+ this.uiNotificationService.snackBarNotification(this.language.instant('GENERAL.SNACK-BAR.SUCCESSFUL-LOGIN'), SnackBarNotificationLevel.Success);
+ this.zone.run(() => this.router.navigate(['/']));
+ }
+
+ onAuthenticateError(errorResponse: HttpErrorResponse) {
+ this.uiNotificationService.snackBarNotification(errorResponse.error.message, SnackBarNotificationLevel.Warning);
+ this.zone.run(() => this.router.navigate(['/']));
+ }
+
+}
\ No newline at end of file
diff --git a/dmp-frontend/src/assets/i18n/de.json b/dmp-frontend/src/assets/i18n/de.json
index 7c84860d5..56158b077 100644
--- a/dmp-frontend/src/assets/i18n/de.json
+++ b/dmp-frontend/src/assets/i18n/de.json
@@ -377,7 +377,8 @@
"ORDER": "Order",
"COMMENT-PLACEHOLDER": "Please Specify",
"COMMENT-HINT": "Provide additional information or justification about your selection",
- "RDA-COMMON-STANDARDS": "RDA Common Standards"
+ "RDA-COMMON-STANDARDS": "RDA Common Standards",
+ "EXPORT": "Include in Export"
},
"ACTIONS": {
"ADD-CHILD-FIELD": "Add Child Field +"
diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json
index fe01ef1f1..28b58596c 100644
--- a/dmp-frontend/src/assets/i18n/en.json
+++ b/dmp-frontend/src/assets/i18n/en.json
@@ -377,7 +377,8 @@
"ORDER": "Order",
"COMMENT-PLACEHOLDER": "Please Specify",
"COMMENT-HINT": "Provide additional information or justification about your selection",
- "RDA-COMMON-STANDARDS": "RDA Common Standards"
+ "RDA-COMMON-STANDARDS": "RDA Common Standards",
+ "EXPORT": "Include in Export"
},
"ACTIONS": {
"ADD-CHILD-FIELD": "Add Child Field +"
diff --git a/dmp-frontend/src/assets/i18n/es.json b/dmp-frontend/src/assets/i18n/es.json
index 1c0e4caf8..095827b6d 100644
--- a/dmp-frontend/src/assets/i18n/es.json
+++ b/dmp-frontend/src/assets/i18n/es.json
@@ -377,7 +377,8 @@
"ORDER": "Orden",
"COMMENT-PLACEHOLDER": "Por favir especifique",
"COMMENT-HINT": "Proporcione información adicional o justifique su selección",
- "RDA-COMMON-STANDARDS": "RDA Common estándares"
+ "RDA-COMMON-STANDARDS": "RDA Common estándares",
+ "EXPORT": "Include in Export"
},
"ACTIONS": {
"ADD-CHILD-FIELD": "Añadir un capo hijo+"
diff --git a/dmp-frontend/src/assets/i18n/gr.json b/dmp-frontend/src/assets/i18n/gr.json
index 5dfe58d7b..531b386a7 100644
--- a/dmp-frontend/src/assets/i18n/gr.json
+++ b/dmp-frontend/src/assets/i18n/gr.json
@@ -377,7 +377,8 @@
"ORDER": "Εντολή",
"COMMENT-PLACEHOLDER": "Παρακαλώ προσδιορίστε",
"COMMENT-HINT": "Προσθέστε επιπλέον πληροφορίες ή αιτιολόγηση σχετικά με την επιλογή σας",
- "RDA-COMMON-STANDARDS": "RDA Common Standards"
+ "RDA-COMMON-STANDARDS": "RDA Common Standards",
+ "EXPORT": "Include in Export"
},
"ACTIONS": {
"ADD-CHILD-FIELD": "Προσθήκη Πεδίου Υπο-ομάδας +"
diff --git a/dmp-frontend/src/assets/i18n/hr.json b/dmp-frontend/src/assets/i18n/hr.json
index 393b7e2a8..450fca8e2 100644
--- a/dmp-frontend/src/assets/i18n/hr.json
+++ b/dmp-frontend/src/assets/i18n/hr.json
@@ -377,7 +377,8 @@
"ORDER": "Redoslijed",
"COMMENT-PLACEHOLDER": "Navedite",
"COMMENT-HINT": "Navedite dodatne informacije ili obrazložite izbor",
- "RDA-COMMON-STANDARDS": "RDA zajednički standardi"
+ "RDA-COMMON-STANDARDS": "RDA zajednički standardi",
+ "EXPORT": "Include in Export"
},
"ACTIONS": {
"ADD-CHILD-FIELD": "Dodajte potpolje +"
diff --git a/dmp-frontend/src/assets/i18n/pt.json b/dmp-frontend/src/assets/i18n/pt.json
index 6a39d3511..26a302ea3 100644
--- a/dmp-frontend/src/assets/i18n/pt.json
+++ b/dmp-frontend/src/assets/i18n/pt.json
@@ -377,7 +377,8 @@
"ORDER": "Ordem",
"COMMENT-PLACEHOLDER": "Por favor especifique",
"COMMENT-HINT": "Disponibilize informação ou justificação adicional sobre a sua seleção",
- "RDA-COMMON-STANDARDS": "Normas RDA"
+ "RDA-COMMON-STANDARDS": "Normas RDA",
+ "EXPORT": "Include in Export"
},
"ACTIONS": {
"ADD-CHILD-FIELD": "Adicionar Campo Subordinado +"
diff --git a/dmp-frontend/src/assets/i18n/sk.json b/dmp-frontend/src/assets/i18n/sk.json
index 728c666b0..d7a548057 100644
--- a/dmp-frontend/src/assets/i18n/sk.json
+++ b/dmp-frontend/src/assets/i18n/sk.json
@@ -377,7 +377,8 @@
"ORDER": "Order",
"COMMENT-PLACEHOLDER": "Please Specify",
"COMMENT-HINT": "Provide additional information or justification about your selection",
- "RDA-COMMON-STANDARDS": "RDA Common Standards"
+ "RDA-COMMON-STANDARDS": "RDA Common Standards",
+ "EXPORT": "Include in Export"
},
"ACTIONS": {
"ADD-CHILD-FIELD": "Add Child Field +"
diff --git a/dmp-frontend/src/assets/i18n/sr.json b/dmp-frontend/src/assets/i18n/sr.json
index 0219d692d..055b4af18 100644
--- a/dmp-frontend/src/assets/i18n/sr.json
+++ b/dmp-frontend/src/assets/i18n/sr.json
@@ -377,7 +377,8 @@
"ORDER": "Redosled",
"COMMENT-PLACEHOLDER": "Navedite",
"COMMENT-HINT": "Navedite dodatne informacije ili obrazložite izbor",
- "RDA-COMMON-STANDARDS": "RDA zajednički standardi"
+ "RDA-COMMON-STANDARDS": "RDA zajednički standardi",
+ "EXPORT": "Include in Export"
},
"ACTIONS": {
"ADD-CHILD-FIELD": "Dodajte izvedeno polje +"
diff --git a/dmp-frontend/src/assets/i18n/tr.json b/dmp-frontend/src/assets/i18n/tr.json
index 868f0bebd..8db9ee10e 100644
--- a/dmp-frontend/src/assets/i18n/tr.json
+++ b/dmp-frontend/src/assets/i18n/tr.json
@@ -377,7 +377,8 @@
"ORDER": "Düzen",
"COMMENT-PLACEHOLDER": "Lütfen Belirtiniz",
"COMMENT-HINT": "Seçiminiz hakkında gerekçe veya ek bilgi veriniz",
- "RDA-COMMON-STANDARDS": "RDA Ortak Standartları"
+ "RDA-COMMON-STANDARDS": "RDA Ortak Standartları",
+ "EXPORT": "Include in Export"
},
"ACTIONS": {
"ADD-CHILD-FIELD": "Alt Alan Ekle +"
diff --git a/dmp-frontend/src/assets/resources/skipDisable.json b/dmp-frontend/src/assets/resources/skipDisable.json
index 7cde08f3d..4a76eb406 100644
--- a/dmp-frontend/src/assets/resources/skipDisable.json
+++ b/dmp-frontend/src/assets/resources/skipDisable.json
@@ -11,5 +11,6 @@
"FreeTextFieldDataEditorModel.label",
"WordListFieldDataEditorModel.label",
"FieldDataOptionEditorModel.label",
- "FieldSetEditorModel.rdaCommonStandard"
+ "FieldSetEditorModel.rdaCommonStandard",
+ "FieldSetEditorModel.export"
]