mirror of
https://github.com/davidallendj/opaal.git
synced 2025-12-20 03:27:02 -07:00
Added print for the authorization code callback
This commit is contained in:
parent
08ff9ee9e5
commit
7114073441
1 changed files with 3 additions and 2 deletions
|
|
@ -14,15 +14,16 @@ func WaitForAuthorizationCode(host string, port int) (string, error) {
|
|||
s := &http.Server{
|
||||
Addr: fmt.Sprintf("%s:%d", host, port),
|
||||
}
|
||||
http.HandleFunc("/oauth/callback", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.HandleFunc("/oidc/callback", func(w http.ResponseWriter, r *http.Request) {
|
||||
// get the code from the OIDC provider
|
||||
if r != nil {
|
||||
code = r.URL.Query().Get("code")
|
||||
fmt.Printf("Authorization Code: %v\n", code)
|
||||
fmt.Printf("authorization code: %v\n", code)
|
||||
}
|
||||
s.Close()
|
||||
|
||||
})
|
||||
fmt.Printf("listening for authorization code at %s/oidc/callback\n", s.Addr)
|
||||
return code, s.ListenAndServe()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue