[progress Communities] [progress Openedge Abl] Forum Post: Is It Possible To Use...

  • Thread starter Thread starter dhubbuck
  • Start date Start date
Status
Not open for further replies.
D

dhubbuck

Guest
Hi, We've played around with OpenEdge 11.6.3 and successfully used some web handlers to return some data into an Angular2 web application and also a Nativescript app. We now want to add some security to the services and have chosen forms_oerealm. This works fine for testing from a browser but I can't seem to get access to the response token/ jsessionid cookie within the javascript (typescript) code when using an http post request to the j_spring_security_check url. Is this because it's just part of the http response or should it come back as json data? The service is currently on a different domain to the Angular 2 app. We have used this method in the past (Angular 1.5) when the webapp was deployed on the same PAS as the services so could it be a CORS issue? Here's a sample of the login code. let headers = new Headers(); headers.append("Content-Type", "application/x-www-form-urlencoded"); headers.append("Cache-Control", "max-age=0"); let options = new RequestOptions({ headers: headers, withCredentials: true }); let data = JSON.stringify({ j_username: user.username, j_password: user.password }); return this.http.post( Config.apiUrl + "static/auth/j_spring_security_check", data, options ) .map(response => response.json()) ; Should this work within a Nativescript app or should we just use the jsdo for session management and login purposes? Any pointers in the right direction would be appreciated. Thanks

Continue reading...
 
Status
Not open for further replies.
Back
Top