Skip to content

Oidc flows

OIDC-Flows

Für die Authentisierung und Autorisierung wird der Authorization Code Flow with Proof Key for Code Exchange (PKCE) verwendet.

Eine detailierte Beschreibung mit einem Sequenz-Diagramm ist unter Authorization Code Flow with Proof Key for Code Exchange (PKCE) auf www.auth0.com/ zu finden.

OIDC-Flow elego Anwendung mit egeli IDP

sequenceDiagram
   title OIDC-Flow mit egeli IDP
   actor User
   participant Elego as Elego (Confidential Client)
   participant Idp as Idp Login Service

   User->>Elego: GET /Account/Login (Login-Flow starten)
   activate User
   activate Elego
   Elego-->>User: HTTP 302 Redirect zu IDP
   deactivate Elego
   User-->>Idp: GET /connect/authorize?client_id=...&redirect_uri=...
   activate Idp
   Idp-->>User: HTTP 302 Redirect auf /Account/Lookup
   deactivate Idp
   User-->>Idp: GET /Account/Lookup
   activate Idp
   Idp-->>User: Rückgabe Login Formular
   deactivate Idp
   deactivate User

   Note right of User: Eingabe Username

   User->>Idp: POST /Account/Lookup?ReturnUrl= (ReturnUrl, EmailOrUsername) 
   activate User
   activate Idp
   Idp->>Idp: Prüfung Username
   Idp-->>User: Rückgabe HTML-Form mit Auto-Submit an redirect_uri /Account/Login
   deactivate Idp

   User-->>Idp: GET /Account/Login
   activate Idp

   Idp-->>User: Rückgabe Anmeldeformular und Cookie idp.loginAttempt

   deactivate Idp
   deactivate User

   Note right of User: Eingabe Passwort

   User->>Idp: POST /Account/Login?returnUrl=... (ReturnUrl, EmailOrUsername, Password) 
   activate User
   activate Idp
   Idp->>Idp: Prüfung Passwort

   Idp-->>User: Rückgabe HTML-Form mit Auto-Submit an returnUrl /connect/authorize/callback
   deactivate Idp

   User-->>Idp: GET /connect/authorize/callback?client_id=...&redirect_uri=...&state=...&nonce=...
   activate Idp
   Idp-->>User: HTTP 302 Redirect auf redirect_uri, Rückgabe idsrv-Cookie

   deactivate Idp

   User-->>Elego: POST /signin-oidc (mit Code)
   activate Elego
   Elego->>Idp: POST /token (code, client_id, client_secret, redirect_uri, grant_type)
   activate Idp
   Idp->>Elego: Access Token und Id Token (signiert von IDP)
   deactivate Idp
   Elego-->>User: Login erfolgreich
   deactivate Elego


   deactivate User
Hold "Alt" / "Option" to enable pan & zoom

OIDC-Flow mit direkt angebundenem Azure Entra ID

Der Login bei direkt angebundenem Azure Entra ID ist wie folgt:

  • Der Benutzer ruft die Elego-Anwendung auf. Die Anwendung leitet ihn zur Azure Entra Login-Seite weiter.

  • Der Benutzer gibt seine Anmeldedaten ein, die an Azure Entra übermittelt werden. Gegebenenfalls wird im Anschluss eine Zusatzfrage gestellt (z. B. "Angemeldet bleiben?").

  • Azure Entra antwortet mit einem HTML-Formular, das über ein automatisches JavaScript-Submit den Authorization Code per POST an den Endpunkt /signin-oidc der Elego-Anwendung übermittelt.

  • Die Elego-Anwendung (mittels Duende-Library) tauscht den Code am Token-Endpoint gegen ein ID Token und Access Token ein. Nach erfolgreicher Validierung wird eine Session erzeugt und die geschützte Seite angezeigt.

Folgendes Sequenzdiagramm zeigt den detaillierten Flow:

sequenceDiagram
   title OIDC-Flow mit direkt angebundenem Azure Entra ID
   actor User
   participant Elego as Elego (Confidential Client)
   participant Idp as Microsoft Entra ID

   User->>Elego: GET /Account/Login (Login-Flow starten)
   activate User
   activate Elego
   Elego-->>User: HTTP 302 Redirect zu redirect_uri (Azure Entra)
   deactivate Elego
   User-->>Idp: GET /authorize?client_id=...&redirect_uri=.../signin-oidc
   activate Idp
   Idp-->>User: Rückgabe HTML-Form "Azure Entry Login"
   deactivate Idp
   User-->>Idp: GET /authorize?client_id=...&redirect_uri=.../signin-oidc&sso_reload=true (auto Ajax Request)
   activate Idp
   deactivate Idp
   deactivate User
   Note right of User: Eingabe der Credentials
   User->>Idp: POST /Login (Übermittlung der Credentials)
   activate User
   activate Idp
   Idp->>Idp: Prüfung der Credentials
   Idp-->>User: Rückgabe HTML-Form "Azure Entra Zusatzinfos"
   deactivate Idp
   deactivate User
   Note right of User: Eingabe Ja / Nein
   User->>Idp: POST /kmsi (Übermittlung der Zusatzinfos)
   activate User
   activate Idp
   Idp-->>User: Rückgabe HTML-Form mit Auto-Submit an redirect_uri .../sign-oidc
   deactivate Idp
   User-->>Elego: POST /signin-oidc
   activate Elego
   Elego->>Idp: POST /token (code, client_id, client_secret, redirect_uri, grant_type)
   activate Idp
   Idp->>Elego: Access Token und Id Token (Signed by Microsoft)
   deactivate Idp
   Elego-->>User: Login erfolgreich
   deactivate Elego
   deactivate User
Hold "Alt" / "Option" to enable pan & zoom