mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 07:23:03 +00:00
use GET for shortlivedtoken requests on the server, POST on the client
This commit is contained in:
@@ -31,6 +31,8 @@ import {
|
||||
import { LocaleService } from '../../app/core/locale/locale.service';
|
||||
import { GoogleAnalyticsService } from '../../app/statistics/google-analytics.service';
|
||||
import { RouterModule, NoPreloading } from '@angular/router';
|
||||
import { AuthRequestService } from '../../app/core/auth/auth-request.service';
|
||||
import { BrowserAuthRequestService } from '../../app/core/auth/browser-auth-request.service';
|
||||
|
||||
export const REQ_KEY = makeStateKey<string>('req');
|
||||
|
||||
@@ -104,6 +106,10 @@ export function getRequest(transferState: TransferState): any {
|
||||
provide: GoogleAnalyticsService,
|
||||
useClass: GoogleAnalyticsService,
|
||||
},
|
||||
{
|
||||
provide: AuthRequestService,
|
||||
useClass: BrowserAuthRequestService,
|
||||
},
|
||||
{
|
||||
provide: LocationToken,
|
||||
useFactory: locationProvider,
|
||||
|
@@ -31,6 +31,8 @@ import { ServerHardRedirectService } from '../../app/core/services/server-hard-r
|
||||
import { Angulartics2 } from 'angulartics2';
|
||||
import { Angulartics2Mock } from '../../app/shared/mocks/angulartics2.service.mock';
|
||||
import { RouterModule } from '@angular/router';
|
||||
import { AuthRequestService } from '../../app/core/auth/auth-request.service';
|
||||
import { ServerAuthRequestService } from '../../app/core/auth/server-auth-request.service';
|
||||
|
||||
export function createTranslateLoader() {
|
||||
return new TranslateJson5UniversalLoader('dist/server/assets/i18n/', '.json5');
|
||||
@@ -82,6 +84,10 @@ export function createTranslateLoader() {
|
||||
provide: SubmissionService,
|
||||
useClass: ServerSubmissionService
|
||||
},
|
||||
{
|
||||
provide: AuthRequestService,
|
||||
useClass: ServerAuthRequestService,
|
||||
},
|
||||
{
|
||||
provide: LocaleService,
|
||||
useClass: ServerLocaleService
|
||||
|
Reference in New Issue
Block a user