This commit is contained in:
Daniel Ponte 2022-09-26 15:00:21 -04:00
parent d474112fd2
commit efd920cb04
7 changed files with 35 additions and 21 deletions

View file

@ -1,14 +1,12 @@
package bus
import (
)
import ()
type Bus struct {
}
func New() *Bus {
bus := &Bus{
}
bus := &Bus{}
return bus
}

View file

@ -18,7 +18,7 @@ func ReadConfig() (*Config, error) {
return nil, err
}
cfgPath := path.Join(home, "/." + common.AppName, "/config.yaml")
cfgPath := path.Join(home, "/."+common.AppName, "/config.yaml")
r, err := os.Open(cfgPath)
if err != nil {

View file

@ -18,7 +18,6 @@ type AuthProviderBase struct {
Type string `json:"type"`
}
func (bp *AuthProviderBase) ProviderName() string { return bp.Name }
func (bp *AuthProviderBase) ProviderID() *string { return bp.ID }
func (bp *AuthProviderBase) ProviderType() string { return bp.Type }
@ -69,3 +68,20 @@ func (s *Server) authorizeHandler(w http.ResponseWriter, r *http.Request) {
panic(err)
}
}
type flowRequest struct {
ClientID string `json:"client_id"`
Handler []*string `json:"handler"`
RedirectURI string `json:"redirect_uri"`
}
func (s *Server) loginFlowHandler(w http.ResponseWriter, r *http.Request) {
var flowReq flowRequest
err := json.NewDecoder(r.Body).Decode(&flowReq)
if err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
}