mirror of
https://github.com/davidallendj/opaal.git
synced 2025-12-20 03:27:02 -07:00
Added CLI and more functionality
This commit is contained in:
parent
c04107cf3d
commit
053095c412
12 changed files with 199 additions and 92 deletions
16
internal/server/server.go
Normal file
16
internal/server/server.go
Normal 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)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue