8 func handle_index(w http
.ResponseWriter
, req
*http
.Request
) {
9 openid_authorization_url
:= generate_authorization_url()
11 http
.Redirect(w
, req
, openid_authorization_url
, 303)
15 fbfp_get_config("fbfp.scfg")
17 log
.Printf("Fetching OpenID Connect configuration\n")
18 get_openid_config(config
.Openid
.Endpoint
)
20 log
.Printf("Registering handlers\n")
21 http
.HandleFunc("/", handle_index
)
22 http
.HandleFunc(config
.Openid
.Redirect
, handle_oidc
)
24 log
.Printf("Listening on %s\n", config
.Listen
)
25 http
.ListenAndServe(config
.Listen
, nil)