updated formatting of JWK endpoint to be compliant (still could use a kid field)

pull/59/head
Justin Richer 13 years ago
parent f17eba9cdc
commit a63c033135

@ -72,7 +72,9 @@ public class JwkKeyListView extends AbstractView {
String e64 = Base64.encodeBase64URLSafeString(exp.toByteArray());
JsonObject o = new JsonObject();
o.addProperty("use", "sig");
o.addProperty("alg", "RSA");
o.addProperty("mod", m64);
o.addProperty("exp", e64);

@ -3,7 +3,9 @@ package org.mitre.openid.connect.web;
import java.security.PublicKey;
import java.security.interfaces.ECPublicKey;
import java.security.interfaces.RSAPublicKey;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.mitre.jwt.signer.service.JwtSigningAndValidationService;
import org.springframework.beans.factory.annotation.Autowired;
@ -24,7 +26,10 @@ public class JsonWebKeyEndpoint {
// TODO: check if keys are empty, return a 404 here or just an empty list?
return new ModelAndView("jwkKeyList", "entity", keys);
Map<String, Object> jwk = new HashMap<String, Object>();
jwk.put("jwk", keys);
return new ModelAndView("jwkKeyList", "entity", jwk);
}
}

Loading…
Cancel
Save