Added CLI and more functionality

This commit is contained in:
David Allen 2024-02-21 17:51:59 -07:00
parent c04107cf3d
commit 053095c412
12 changed files with 199 additions and 92 deletions

16
internal/server/server.go Normal file
View file

@ -0,0 +1,16 @@
package server
import (
"fmt"
"net/http"
)
func Start(host string, port int) error {
http.HandleFunc("/oauth/callback", getAuthorizationCode)
err := http.ListenAndServe(host+":"+fmt.Sprintf("%d", port), nil)
return err
}
func getAuthorizationCode(w http.ResponseWriter, r *http.Request) {
fmt.Printf("response from OIDC provider: %v\n", r)
}