keys and more
This commit is contained in:
parent
92dee085b7
commit
3082234dae
9 changed files with 74 additions and 3 deletions
19
pkg/op/keys.go
Normal file
19
pkg/op/keys.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
package op
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/caos/oidc/pkg/utils"
|
||||
)
|
||||
|
||||
type KeyProvider interface {
|
||||
Storage() Storage
|
||||
}
|
||||
|
||||
func Keys(w http.ResponseWriter, r *http.Request, k KeyProvider) {
|
||||
keySet, err := k.Storage().GetKeySet()
|
||||
if err != nil {
|
||||
|
||||
}
|
||||
utils.MarshalJSON(w, keySet)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue