Improve oauth integration (#21266)
This commit is contained in:
parent
4c73cbe197
commit
11e769ea22
18 changed files with 219 additions and 208 deletions
10
api/api.go
10
api/api.go
|
|
@ -3,7 +3,7 @@ package api
|
|||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
|
@ -193,9 +193,11 @@ type Tariff interface {
|
|||
|
||||
// AuthProvider is the ability to provide OAuth authentication through the ui
|
||||
type AuthProvider interface {
|
||||
HandleCallback(r *http.Request)
|
||||
HandleLogout(r *http.Request)
|
||||
AuthCodeURL(state string) string
|
||||
Login(state string) string
|
||||
Logout() error
|
||||
HandleCallback(responseValues url.Values) error
|
||||
Authenticated() bool
|
||||
DisplayName() string
|
||||
}
|
||||
|
||||
// IconDescriber optionally provides an icon
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue