logotype
  • Startseite
  • Blog
  • Leistungen
    • Engineering
    • Services
    • Infrastruktur
    • Individuelle Software
  • Lösungen
  • Unternehmen
    • Technologie
    • Über uns
    • Kontakt
    • Karriere / Jobs
logotype
  • Startseite
  • Blog
  • Leistungen
    • Engineering
    • Services
    • Infrastruktur
    • Individuelle Software
  • Lösungen
  • Unternehmen
    • Technologie
    • Über uns
    • Kontakt
    • Karriere / Jobs
logotype
  • Startseite
  • Blog
  • Leistungen
    • Engineering
    • Services
    • Infrastruktur
    • Individuelle Software
  • Lösungen
  • Unternehmen
    • Technologie
    • Über uns
    • Kontakt
    • Karriere / Jobs
  • Startseite
  • Blog
  • Leistungen
    • Engineering
    • Services
    • Infrastruktur
    • Individuelle Software
  • Lösungen
  • Unternehmen
    • Technologie
    • Über uns
    • Kontakt
    • Karriere / Jobs
logotype
logotype
  • Startseite
  • Blog
  • Leistungen
    • Engineering
    • Services
    • Infrastruktur
    • Individuelle Software
  • Lösungen
  • Unternehmen
    • Technologie
    • Über uns
    • Kontakt
    • Karriere / Jobs
Blog Post

Angular JS2 JAX-RS Example

admin 23.01.2017
How to deal with JAAS and CORS

The first part of this post describes how you can get a JAX-RS endpoint running with an AngularJS2 app and afterwards made some changes to get it running with basic authentication and CORS.

The following JavaEE backend is pretty standard (except of the definition of Application within the resource which is usually done in a seperate class).

This AngularJS2 app is basically a small variation of the (AngularJS2 Quickstart) and only displays the data from the JAX-RS endpoint.

If you now want to use basis authentication you have to do the following changes

Define a Http header with the necessary information

Pass it to the Http request

Add a JavaEE CORS Filter

Omit Http-Method Option for the secure JAX-RS endpoint otherwise you get a 401 for the preflight request

The complete example can be found (here).

How to use Chroniclemap with JAVA EE

16.05.2016

Moderne JavaScript Entwicklung und Benutzeroberflächen mit React

06.02.2017

Related Posts

admin 0 Comments

KI-Modelle: Temperatur erklärt

READ MORE
Volker Müller 0 Comments

Multifaktor-Authentifizierung mit mehreren OTP_Clients

READ MORE
logotype
  • +49 89 3090897-0
  • +49 89 3090897-99
  • info@siteos.de
  • Kapellenweg 6, 81371 München

 

Impressum

Datenschutz

Datenschutz Bewerber

© Copyright 2025 SiteOS AG. All rights reserved.

Whatsapp Xing Instagram Facebook Linkedin