mirror of
https://github.com/davidallendj/opaal.git
synced 2025-12-20 03:27:02 -07:00
16 lines
351 B
Go
16 lines
351 B
Go
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)
|
|
}
|