Shbboleth workflow new

This commit is contained in:
Julius Gruber
2019-06-24 10:43:55 +02:00
parent c4ab1c5180
commit 3d5b3ea9a1
8 changed files with 58 additions and 3 deletions

View File

@@ -2,11 +2,13 @@ import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { LoginPageComponent } from './login-page.component'; import { LoginPageComponent } from './login-page.component';
import {ShibbolethComponent} from './shibboleth/shibboleth.component';
@NgModule({ @NgModule({
imports: [ imports: [
RouterModule.forChild([ RouterModule.forChild([
{ path: '', pathMatch: 'full', component: LoginPageComponent, data: { title: 'login.title' } } { path: '', pathMatch: 'full', component: LoginPageComponent, data: { title: 'login.title' } }
/* { path: 'shibboleth', component: ShibbolethComponent }*/
]) ])
] ]
}) })

View File

@@ -3,6 +3,7 @@ import { NgModule } from '@angular/core';
import { SharedModule } from '../shared/shared.module'; import { SharedModule } from '../shared/shared.module';
import { LoginPageComponent } from './login-page.component'; import { LoginPageComponent } from './login-page.component';
import { LoginPageRoutingModule } from './login-page-routing.module'; import { LoginPageRoutingModule } from './login-page-routing.module';
import {ShibbolethComponent} from './shibboleth/shibboleth.component';
@NgModule({ @NgModule({
imports: [ imports: [
@@ -11,7 +12,8 @@ import { LoginPageRoutingModule } from './login-page-routing.module';
SharedModule, SharedModule,
], ],
declarations: [ declarations: [
LoginPageComponent LoginPageComponent,
/* ShibbolethComponent*/
] ]
}) })
export class LoginPageModule { export class LoginPageModule {

View File

@@ -0,0 +1,3 @@
<p>
shibboleth works!
</p>

View File

@@ -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<ShibbolethComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ ShibbolethComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ShibbolethComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@@ -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<CoreState>,) { }
ngOnInit() {
this.store.dispatch(new ShibbLoginAction());
}
}

View File

@@ -3,6 +3,7 @@ import { RouterModule } from '@angular/router';
import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component'; import { PageNotFoundComponent } from './pagenotfound/pagenotfound.component';
import { AuthenticatedGuard } from './core/auth/authenticated.guard'; import { AuthenticatedGuard } from './core/auth/authenticated.guard';
import {ShibbolethComponent} from './+login-page/shibboleth/shibboleth.component';
const ITEM_MODULE_PATH = 'items'; const ITEM_MODULE_PATH = 'items';
export function getItemModulePath() { export function getItemModulePath() {
@@ -32,7 +33,8 @@ export function getCommunityModulePath() {
{ path: 'logout', loadChildren: './+logout-page/logout-page.module#LogoutPageModule' }, { path: 'logout', loadChildren: './+logout-page/logout-page.module#LogoutPageModule' },
{ path: 'submit', loadChildren: './+submit-page/submit-page.module#SubmitPageModule' }, { path: 'submit', loadChildren: './+submit-page/submit-page.module#SubmitPageModule' },
{ path: 'workspaceitems', loadChildren: './+workspaceitems-edit-page/workspaceitems-edit-page.module#WorkspaceitemsEditPageModule' }, { 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 }, { path: '**', pathMatch: 'full', component: PageNotFoundComponent },
]) ])
], ],

View File

@@ -39,6 +39,7 @@ import { ExpandableAdminSidebarSectionComponent } from './+admin/admin-sidebar/e
import { NavbarModule } from './navbar/navbar.module'; import { NavbarModule } from './navbar/navbar.module';
import { JournalEntitiesModule } from './entity-groups/journal-entities/journal-entities.module'; import { JournalEntitiesModule } from './entity-groups/journal-entities/journal-entities.module';
import { ResearchEntitiesModule } from './entity-groups/research-entities/research-entities.module'; import { ResearchEntitiesModule } from './entity-groups/research-entities/research-entities.module';
import { ShibbolethComponent } from './+login-page/shibboleth/shibboleth.component';
export function getConfig() { export function getConfig() {
return ENV_CONFIG; return ENV_CONFIG;
@@ -128,6 +129,7 @@ const EXPORTS = [
], ],
declarations: [ declarations: [
...DECLARATIONS, ...DECLARATIONS,
ShibbolethComponent,
], ],
exports: [ exports: [
...EXPORTS ...EXPORTS

View File

@@ -36,7 +36,7 @@
<div> <div>
<br> <br>
<a class="btn btn-lg btn-primary btn-block mt-2" <a class="btn btn-lg btn-primary btn-block mt-2"
href="https://fis.tiss.tuwien.ac.at/Shibboleth.sso/Login" href="https://fis.tiss.tuwien.ac.at/Shibboleth.sso/Login?target=https://fis.tiss.tuwien.ac.at/shibboleth"
role="button" role="button"
>HardCoded Shibb</a> >HardCoded Shibb</a>
</div> </div>