Skip to content

feat: multi-operator login --- umbrella API key, api.key config, providers list - #1

Open
datenwurm wants to merge 1 commit into
maxboettinger:mainfrom
datenwurm:feat/configurable-api-key
Open

feat: multi-operator login --- umbrella API key, api.key config, providers list#1
datenwurm wants to merge 1 commit into
maxboettinger:mainfrom
datenwurm:feat/configurable-api-key

Conversation

@datenwurm

@datenwurm datenwurm commented Jul 21, 2026

Copy link
Copy Markdown

Description:
The backend is multi-tenant, and the app-level x-api-key gates which operators' customers may log in: the previous (website) key only allows teilauto Mitteldeutschland (118), so setting api.prov_id to any other operator did not work.

Modifications:
Switched the default key to the 'Carsharing Deutschland' umbrella app key, whose login-eligible set covers every teilauto region and most other German Cantamen-based operators.

Adds teilauto providers list (id, abbrev, name; configured api.prov_id marked) so users can discover their operator id without guessing.

Also added the api.key config override (TEILAUTO_API_KEY) and prompt for 'Email or customer number' at login, since regional operators commonly use the Kundennummer.

Derived from static + live analysis of the two official Android apps (net.teilauto.m and de.cantamen.carsharing.deutschland).

Example:

$ teilauto providers list
                                 Operators                                  
┏━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━┓
┃ ID  ┃ Abbrev ┃ Name                                           ┃ Selected ┃
┡━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━┩
│ 101 │ AEW    │ AEW Energie AG                                 │          │
│ 6   │ BYM    │ Bayreuth Mobil e.V.                            │          │
│ 125 │ BND    │ book-n-drive                                   │          │
│ 12  │ CAN    │ cantamen GmbH                                  │          │
│ 138 │ HND    │ Carsharing Hohen Neuendorf                     │          │
│ 139 │ VÖMW   │ CarSharing Wendlingen                          │          │
│ 32  │ COF    │ conficars Ulm                                  │          │
│ 97  │ ESW    │ ESEL.cab GmbH                                  │          │
│ 60  │ LEV    │ Flexicar GmbH                                  │          │
│ 98  │ GAG    │ Grünes Auto Göttingen                          │          │
│ 110 │ GTK    │ gtk-mobil                                      │          │
│ 111 │ LTB    │ LTB Leipzig                                    │          │
│ 91  │ MYC    │ my-e-car (CH)                                  │          │
│ 84  │ MY     │ my-e-car (D)                                   │          │
│ 64  │ SSB    │ naturenergie sharing GmbH                      │          │
│ 69  │ FU     │ Öko-Mobil Furtwangen                           │          │
│ 79  │ ÖR     │ Ökostadt Renningen e.V.                        │          │
│ 113 │ RHA    │ Region Hannover Bike and Ride                  │          │
│ 132 │ RHZF   │ Region Hannover zentraler Fuhrpark             │          │
│ 116 │ RUB    │ Ruhrbahn GmbH                                  │          │
│ 137 │ SCO    │ scouter                                        │          │
│ 44  │ KEM    │ stadtflitzer carsharing                        │          │
│ 39  │ BLN    │ stadtmobil Berlin                              │          │
│ 14  │ HAN    │ stadtmobil Hannover                            │          │
│ 8   │ KA     │ stadtmobil Karlsruhe                           │          │
│ 5   │ FRM    │ stadtmobil Rhein-Main                          │          │
│ 1   │ MA     │ stadtmobil Rhein-Neckar                        │          │
│ 45  │ SRR    │ stadtmobil Rhein-Ruhr                          │          │
│ 3   │ ST     │ stadtmobil Stuttgart                           │          │
│ 82  │ TR     │ stadtmobil Trier                               │          │
│ 25  │ GO     │ stadt-teil-auto Car Sharing Göttingen          │          │
│ 136 │ STF    │ StadtTeilAuto Freising                         │          │
│ 18  │ OS     │ stadtteilauto Osnabrück                        │          │
│ 133 │ FFO    │ Stadtverkehrsgesellschaft mbH Frankfurt (Oder) │          │
│ 87  │ SWA    │ Stadtwerke Augsburg Carsharing-GmbH            │          │
│ 103 │ SWB    │ Stadtwerke Bielefeld GmbH                      │          │
│ 88  │ SWU    │ Stadtwerke eCarSharing                         │          │
│ 127 │ SWH    │ Stadtwerke Husum GmbH                          │          │
│ 59  │ SWO    │ Stadtwerke Osnabrück                           │          │
│ 17  │ BN     │ Stattauto Bonn                                 │          │
│ 50  │ KS     │ STATTAUTO Carsharing Kassel                    │          │
│ 22  │ DMD    │ Stattauto Detmold                              │          │
│ 47  │ LUE    │ StattAuto Kiel/Lübeck                          │          │
│ 115 │ U2G    │ swu2go                                         │          │
│ 129 │ ULM    │ SWU Stadt Ulm                                  │          │
│ 114 │ SU     │ SWU Verkehr GmbH                               │          │
│ 118 │ TAM    │ teilAuto & cityflitzer Mitteldeutschland       │ ✓        │
│ 57  │ BIB    │ teilAuto Biberach Riss e.V.                    │          │
│ 4   │ SH     │ teilAuto e.V. Schwäbisch-Hall                  │          │
│ 19  │ TÜ     │ teilAuto Neckar-Alb                            │          │
│ 38  │ WDO    │ Willmobil Carsharing                           │          │
│ 112 │ WUP    │ wupsiCar                                       │          │
│ 86  │ CAT    │ ZoomCarsharing                                 │          │
└─────┴────────┴────────────────────────────────────────────────┴──────────┘
 Set yours with `teilauto config set api.prov_id <ID>`, then log in again.  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant