Cardata: display oauth user code (#25818)

This commit is contained in:
andig 2025-12-09 08:32:05 +01:00 • committed by GitHub
parent 157f9d207c
commit c5fc4b4f99
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 993 additions and 220 deletions

View file

@ -5,6 +5,8 @@ import (
"io"
"net/url"
"time"
"golang.org/x/oauth2"
)
//go:generate go tool mockgen -package api -destination mock.go github.com/evcc-io/evcc/api Charger,ChargeState,CurrentLimiter,CurrentGetter,PhaseSwitcher,PhaseGetter,FeatureDescriber,Identifier,Meter,MeterEnergy,PhaseCurrents,Vehicle,ConnectionTimer,ChargeRater,Battery,BatteryController,BatterySocLimiter,Circuit,Dimmer,Tariff
@ -214,7 +216,7 @@ type Tariff interface {
// AuthProvider is the ability to provide OAuth authentication through the ui
type AuthProvider interface {
Login(state string) (string, error)
Login(state string) (string, *oauth2.DeviceAuthResponse, error)
Logout() error
HandleCallback(params url.Values) error
Authenticated() bool