File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import {
1717import { map } from 'rxjs/operators' ;
1818import { Observable } from 'rxjs' ;
1919import { XSRFService } from '../xsrf/xsrf.service' ;
20+ import { RESTURLCombiner } from '../url-combiner/rest-url-combiner' ;
2021
2122/**
2223 * Server side version of the service to send authentication requests
@@ -41,8 +42,8 @@ export class ServerAuthRequestService extends AuthRequestService {
4142 * @protected
4243 */
4344 protected createShortLivedTokenRequest ( href : string ) : Observable < PostRequest > {
44- // First do a call to the root endpoint in order to get an XSRF token
45- return this . httpClient . get ( this . halService . getRootHref ( ) , { observe : 'response' } ) . pipe (
45+ // First do a call to the csrf endpoint in order to get an XSRF token
46+ return this . httpClient . get ( new RESTURLCombiner ( '/security/csrf' ) . toString ( ) , { observe : 'response' } ) . pipe (
4647 // retrieve the XSRF token from the response header
4748 map ( ( response : HttpResponse < any > ) => response . headers . get ( XSRF_RESPONSE_HEADER ) ) ,
4849 map ( ( xsrfToken : string ) => {
You can’t perform that action at this time.
0 commit comments