Skip to main content

Pressmatix Aboverwaltung Integrationsmöglichkeiten

Zielarchitektur

  1. Benutzerauthentifizierung läuft über einen OIDC-Provider (PX-User, Auth0 oder Keycloak)
  2. Benutzer Authentifiziert sich in der PressMatrix App oder im Web am Pressmatrix-Kontext [läuft über den OIDC-Provider]
  3. Es wird ein Access Token-Generiert
  4. Pressmatrix ruft beim Zugriff die eigene Middleware auf
  5. Middleware erhält den OIDC-Token

Beispiel-Aufruf durch Pressmatrix

curl -X POST https://{auth-server-url}/pmx-api/v2/{profile_token}/authorize \
  -H "Authorization: Bearer {ACCESS_TOKEN}" \
  -H "OIDC-ID-Token: {OIDC_ID_TOKEN}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "issue_name": "Sample Issue May 2014",
    "issue_date": "2014-05-01",
    "category_name": "Sample Category",
    "category_ids": "20924,20925",
    "product_id_apple": "sample_issue_2014_05",
    "product_id_google": "sample_issue_2014_05",
    "product_id_amazon": "sample_issue_2014_05",
    "product_id_external": "sample_id_1,sample_id_2"
  }'

Unsere Middleware prüft zuerst ob der Token gültig ist [Anfrage zum OIDC-Provider]

Wenn der Token ungültig ist, wird der Status 401, Unauthorized zurückgegeben

Wenn der Token gültig ist, wird im CRM geprüft, ob der Kunde Zugriff auf die angefragte Ressource hat

falls ja: Rückgabe von granted: true

falls nein: Rückgabe von granted: false

image.png