Compare commits

..

3 Commits

Author SHA1 Message Date
f06dd72213 Updates application registration endpoints
All checks were successful
Build, Push and Run Container / build (push) Successful in 25s
Changes the application registration endpoints to use the ITeslaAuthenticatorService interface.

Updates the KeyPairing endpoint to redirect to the correct Tesla connector app.
Adds a new KeyPairing2 endpoint.
2025-08-18 12:28:05 +02:00
5719bf41b9 Certificate manager removed 2025-08-17 16:14:09 +02:00
dee65c9ee4 Certificate Manager? 2025-08-17 16:13:39 +02:00

View File

@@ -169,10 +169,11 @@ if (app.Environment.IsDevelopment())
return JsonSerializer.Serialize(token, new JsonSerializerOptions() { WriteIndented = true });
});
app.MapGet("/CheckRegisteredApplication", ([FromServices] TeslaAuthenticatorService service) => service.CheckApplicationRegistrationAsync());
app.MapGet("/RegisterApplication", ([FromServices] TeslaAuthenticatorService service) => service.RegisterApplicationAsync());
app.MapGet("/CheckRegisteredApplication", ([FromServices] ITeslaAuthenticatorService service) => service.CheckApplicationRegistrationAsync());
app.MapGet("/RegisterApplication", ([FromServices] ITeslaAuthenticatorService service) => service.RegisterApplicationAsync());
app.MapGet("/Authorize", async (IHttpContextAccessor contextAccessor) => await (contextAccessor.HttpContext!).ChallengeAsync(OpenIdConnectDefaults.AuthenticationScheme, new AuthenticationProperties { RedirectUri = "/Tesla" }));
app.MapGet("/KeyPairing", () => Results.Redirect("https://tesla.com/_ak/developer-domain.com"));
app.MapGet("/KeyPairing", () => Results.Redirect("https://tesla.com/_ak/tesla-connector.automatic-parking.app"));
app.MapGet("/KeyPairing2", () => Results.Redirect("https://tesla.com/_ak/automatic-parking.app"));
app.MapGet("/Tokens", async (IHttpContextAccessor httpContextAccessor) =>
{
var ctx = httpContextAccessor.HttpContext;