Commit 56feb7ae authored by Simon Schürg's avatar Simon Schürg 🚀
Browse files

refactor

parent 3204690c
......@@ -69,14 +69,16 @@ type OIDCMetadata struct {
}
func main() {
fmt.Println("Test")
// fmt.Println("Test")
issuer := "https://auth.schuerg.net/auth/realms/playground"
oidcMetadata := FetchOidcMetadata(issuer)
fmt.Println(oidcMetadata)
// oidcMetadata := FetchOidcMetadata(issuer)
// fmt.Println(oidcMetadata)
// jwks := FetchOIDCCerts(issuer)
jwks := FetchOIDCCerts(issuer)
fmt.Println(jwks)
// fmt.Println(jwks)
for i := 0; i < len(jwks.Keys); i++ {
JWKToPEM(jwks.Keys[i])
pem := JWKToPEM(jwks.Keys[i])
fmt.Println(pem)
}
}
......@@ -115,7 +117,6 @@ func base64ToInt(s string) (uint32, error) {
}
func JWKToPEM(jwk JWK) string {
fmt.Println(jwk.Kty)
if jwk.Kty != "RSA" {
log.Fatal("invalid key type:", jwk.Kty)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment