mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
prototype: k8s jwt auth support
This commit is contained in:
parent
298a5a94a5
commit
6629170eb3
3 changed files with 20 additions and 1 deletions
17
internal/handlers/openid_configuration.go
Normal file
17
internal/handlers/openid_configuration.go
Normal file
|
@ -0,0 +1,17 @@
|
|||
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(),
|
||||
})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue