mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 18:36:30 +02:00
17 lines
429 B
Go
17 lines
429 B
Go
package handlers
|
|
|
|
import (
|
|
"encoding/json"
|
|
"net/http"
|
|
"net/url"
|
|
|
|
"github.com/pomerium/pomerium/internal/urlutil"
|
|
)
|
|
|
|
func OpenidConfiguration(w http.ResponseWriter, r *http.Request) {
|
|
u := urlutil.GetAbsoluteURL(r)
|
|
json.NewEncoder(w).Encode(map[string]string{
|
|
"issuer": u.ResolveReference(&url.URL{Path: "/"}).String(),
|
|
"jwks_uri": u.ResolveReference(&url.URL{Path: "/.well-known/pomerium/jwks.json"}).String(),
|
|
})
|
|
}
|