From 3d5b3ea9a163812c8e476c2619301e67951e0539 Mon Sep 17 00:00:00 2001 From: Julius Gruber Date: Mon, 24 Jun 2019 10:43:55 +0200 Subject: [PATCH] Shbboleth workflow new --- .../+login-page/login-page-routing.module.ts | 2 ++ src/app/+login-page/login-page.module.ts | 4 ++- .../shibboleth/shibboleth.component.html | 3 +++ .../shibboleth/shibboleth.component.spec.ts | 25 +++++++++++++++++++ .../shibboleth/shibboleth.component.ts | 19 ++++++++++++++ src/app/app-routing.module.ts | 4 ++- src/app/app.module.ts | 2 ++ src/app/shared/log-in/log-in.component.html | 2 +- 8 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 src/app/+login-page/shibboleth/shibboleth.component.html create mode 100644 src/app/+login-page/shibboleth/shibboleth.component.spec.ts create mode 100644 src/app/+login-page/shibboleth/shibboleth.component.ts diff --git a/src/app/+login-page/login-page-routing.module.ts b/src/app/+login-page/login-page-routing.module.ts index d3c6425dd3..6a7520fae1 100644 --- a/src/app/+login-page/login-page-routing.module.ts +++ b/src/app/+login-page/login-page-routing.module.ts @@ -2,11 +2,13 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { LoginPageComponent } from './login-page.component'; +import {ShibbolethComponent} from './shibboleth/shibboleth.component'; @NgModule({ imports: [ RouterModule.forChild([ { path: '', pathMatch: 'full', component: LoginPageComponent, data: { title: 'login.title' } } + /* { path: 'shibboleth', component: ShibbolethComponent }*/ ]) ] }) diff --git a/src/app/+login-page/login-page.module.ts b/src/app/+login-page/login-page.module.ts index 4d3f726c40..f16f38d3bd 100644 --- a/src/app/+login-page/login-page.module.ts +++ b/src/app/+login-page/login-page.module.ts @@ -3,6 +3,7 @@ import { NgModule } from '@angular/core'; import { SharedModule } from '../shared/shared.module'; import { LoginPageComponent } from './login-page.component'; import { LoginPageRoutingModule } from './login-page-routing.module'; +import {ShibbolethComponent} from './shibboleth/shibboleth.component'; @NgModule({ imports: [ @@ -11,7 +12,8 @@ import { LoginPageRoutingModule } from './login-page-routing.module'; SharedModule, ], declarations: [ - LoginPageComponent + LoginPageComponent, + /* ShibbolethComponent*/ ] }) export class LoginPageModule { diff --git a/src/app/+login-page/shibboleth/shibboleth.component.html b/src/app/+login-page/shibboleth/shibboleth.component.html new file mode 100644 index 0000000000..e1bfd6b052 --- /dev/null +++ b/src/app/+login-page/shibboleth/shibboleth.component.html @@ -0,0 +1,3 @@ +

+ shibboleth works! +

diff --git a/src/app/+login-page/shibboleth/shibboleth.component.spec.ts b/src/app/+login-page/shibboleth/shibboleth.component.spec.ts new file mode 100644 index 0000000000..a12c43866f --- /dev/null +++ b/src/app/+login-page/shibboleth/shibboleth.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ShibbolethComponent } from './shibboleth.component'; + +describe('ShibbolethComponent', () => { + let component: ShibbolethComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ ShibbolethComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ShibbolethComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/+login-page/shibboleth/shibboleth.component.ts b/src/app/+login-page/shibboleth/shibboleth.component.ts new file mode 100644 index 0000000000..b2a0398128 --- /dev/null +++ b/src/app/+login-page/shibboleth/shibboleth.component.ts @@ -0,0 +1,19 @@ +import { Component, OnInit } from '@angular/core'; +import {ShibbLoginAction} from '../../core/auth/auth.actions'; +import {Store} from '@ngrx/store'; +import {CoreState} from '../../core/core.reducers'; + +@Component({ + selector: 'ds-shibboleth-page', + templateUrl: './shibboleth.component.html', + styleUrls: ['./shibboleth.component.css'] +}) +export class ShibbolethComponent implements OnInit { + + constructor( private store: Store,) { } + + ngOnInit() { + this.store.dispatch(new ShibbLoginAction()); + } + +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 86364aca89..f3196ffeed 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -3,6 +3,7 @@ import { RouterModule } from '@angular/router'; import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component'; import { AuthenticatedGuard } from './core/auth/authenticated.guard'; +import {ShibbolethComponent} from './+login-page/shibboleth/shibboleth.component'; const ITEM_MODULE_PATH = 'items'; export function getItemModulePath() { @@ -32,7 +33,8 @@ export function getCommunityModulePath() { { path: 'logout', loadChildren: './+logout-page/logout-page.module#LogoutPageModule' }, { path: 'submit', loadChildren: './+submit-page/submit-page.module#SubmitPageModule' }, { path: 'workspaceitems', loadChildren: './+workspaceitems-edit-page/workspaceitems-edit-page.module#WorkspaceitemsEditPageModule' }, - { path: 'workflowitems', loadChildren: './+workflowitems-edit-page/workflowitems-edit-page.module#WorkflowItemsEditPageModule' }, + { path: 'workflowitems', loadChildren: './+workflowitems-edit-page/workflowitems-edit-page.module#WorkflowitemsEditPageModule' }, + { path: 'shibboleth', pathMatch: 'full', component: ShibbolethComponent }, { path: '**', pathMatch: 'full', component: PageNotFoundComponent }, ]) ], diff --git a/src/app/app.module.ts b/src/app/app.module.ts index ddcd78ce8e..eaf0dc053b 100755 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -39,6 +39,7 @@ import { ExpandableAdminSidebarSectionComponent } from './+admin/admin-sidebar/e import { NavbarModule } from './navbar/navbar.module'; import { JournalEntitiesModule } from './entity-groups/journal-entities/journal-entities.module'; import { ResearchEntitiesModule } from './entity-groups/research-entities/research-entities.module'; +import { ShibbolethComponent } from './+login-page/shibboleth/shibboleth.component'; export function getConfig() { return ENV_CONFIG; @@ -128,6 +129,7 @@ const EXPORTS = [ ], declarations: [ ...DECLARATIONS, + ShibbolethComponent, ], exports: [ ...EXPORTS diff --git a/src/app/shared/log-in/log-in.component.html b/src/app/shared/log-in/log-in.component.html index 7a66b43d00..251a6ff3bc 100644 --- a/src/app/shared/log-in/log-in.component.html +++ b/src/app/shared/log-in/log-in.component.html @@ -36,7 +36,7 @@

HardCoded Shibb