mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Added log to interceptor
This commit is contained in:
@@ -101,6 +101,8 @@ export class AuthInterceptor implements HttpInterceptor {
|
||||
const token = authService.getToken();
|
||||
let newReq;
|
||||
|
||||
console.log('intercept() request: ', req);
|
||||
|
||||
if (authService.isTokenExpired()) {
|
||||
authService.setRedirectUrl(this.router.url);
|
||||
// The access token is expired
|
||||
|
@@ -38,7 +38,7 @@
|
||||
<a class="btn btn-lg btn-primary btn-block mt-2"
|
||||
href="https://fis.tiss.tuwien.ac.at/Shibboleth.sso/Login"
|
||||
role="button"
|
||||
>HardCoded Shibb</a>
|
||||
>HardCoded Shibb</a>
|
||||
</div>
|
||||
|
||||
|
||||
|
@@ -0,0 +1,3 @@
|
||||
<p>
|
||||
Shibboleth Login Page
|
||||
</p>
|
@@ -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();
|
||||
});
|
||||
});
|
15
src/app/shared/log-in/shibboleth/shibboleth.component.ts
Normal file
15
src/app/shared/log-in/shibboleth/shibboleth.component.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'shibboleth',
|
||||
templateUrl: './shibboleth.component.html',
|
||||
styleUrls: ['./shibboleth.component.css']
|
||||
})
|
||||
export class ShibbolethComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
@@ -138,6 +138,7 @@ import { RoleDirective } from './roles/role.directive';
|
||||
import { UserMenuComponent } from './auth-nav-menu/user-menu/user-menu.component';
|
||||
import { ClaimedTaskActionsReturnToPoolComponent } from './mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component';
|
||||
import { ItemDetailPreviewFieldComponent } from './object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview-field/item-detail-preview-field.component';
|
||||
import { ShibbolethComponent } from './log-in/shibboleth/shibboleth.component';
|
||||
|
||||
const MODULES = [
|
||||
// Do NOT include UniversalModule, HttpModule, or JsonpModule here
|
||||
@@ -338,7 +339,8 @@ const DIRECTIVES = [
|
||||
...COMPONENTS,
|
||||
...DIRECTIVES,
|
||||
...ENTRY_COMPONENTS,
|
||||
...SHARED_ITEM_PAGE_COMPONENTS
|
||||
...SHARED_ITEM_PAGE_COMPONENTS,
|
||||
ShibbolethComponent
|
||||
],
|
||||
providers: [
|
||||
...PROVIDERS
|
||||
|
Reference in New Issue
Block a user