updated formatting of JWK endpoint to be compliant (still could use a kid field)
parent
f17eba9cdc
commit
a63c033135
|
@ -73,6 +73,8 @@ public class JwkKeyListView extends AbstractView {
|
||||||
|
|
||||||
JsonObject o = new JsonObject();
|
JsonObject o = new JsonObject();
|
||||||
|
|
||||||
|
o.addProperty("use", "sig");
|
||||||
|
o.addProperty("alg", "RSA");
|
||||||
o.addProperty("mod", m64);
|
o.addProperty("mod", m64);
|
||||||
o.addProperty("exp", e64);
|
o.addProperty("exp", e64);
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,9 @@ package org.mitre.openid.connect.web;
|
||||||
import java.security.PublicKey;
|
import java.security.PublicKey;
|
||||||
import java.security.interfaces.ECPublicKey;
|
import java.security.interfaces.ECPublicKey;
|
||||||
import java.security.interfaces.RSAPublicKey;
|
import java.security.interfaces.RSAPublicKey;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
import org.mitre.jwt.signer.service.JwtSigningAndValidationService;
|
import org.mitre.jwt.signer.service.JwtSigningAndValidationService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
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?
|
// 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…
Reference in New Issue