Cardata: display oauth user code (#25818)
This commit is contained in:
parent
157f9d207c
commit
c5fc4b4f99
28 changed files with 993 additions and 220 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue