jwk Pretty
This commit is contained in:
@@ -46,6 +46,7 @@ import org.maxkey.crypto.jose.keystore.JWKSetKeyStore;
|
||||
import org.maxkey.util.HttpEncoder;
|
||||
import org.maxkey.entity.apps.Apps;
|
||||
import org.maxkey.entity.apps.oauth2.provider.ClientDetails;
|
||||
import org.maxkey.pretty.PrettyFactory;
|
||||
import org.maxkey.web.WebConstants;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.slf4j.Logger;
|
||||
@@ -309,7 +310,8 @@ public class AuthorizationEndpoint extends AbstractEndpoint {
|
||||
}
|
||||
JWKSetKeyStore jwkSetKeyStore = new JWKSetKeyStore("{\"keys\": [" + jwkSetString + "]}");
|
||||
|
||||
return jwkSetKeyStore.getJwkSet().toPublicJWKSet().toString();
|
||||
return PrettyFactory.getJsonPretty().format(
|
||||
jwkSetKeyStore.getJwkSet().toPublicJWKSet().toString());
|
||||
}
|
||||
|
||||
// We need explicit approval from the user.
|
||||
|
||||
@@ -36,7 +36,6 @@ import org.maxkey.authz.oauth2.provider.ClientDetailsService;
|
||||
import org.maxkey.authz.oauth2.provider.OAuth2Authentication;
|
||||
import org.maxkey.authz.oauth2.provider.token.DefaultTokenServices;
|
||||
import org.maxkey.constants.ContentType;
|
||||
import org.maxkey.crypto.jose.keystore.JWKSetKeyStore;
|
||||
import org.maxkey.crypto.jwt.encryption.service.impl.DefaultJwtEncryptionAndDecryptionService;
|
||||
import org.maxkey.crypto.jwt.signer.service.impl.DefaultJwtSigningAndValidationService;
|
||||
import org.maxkey.entity.UserInfo;
|
||||
@@ -56,9 +55,7 @@ import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.nimbusds.jose.EncryptionMethod;
|
||||
import com.nimbusds.jose.JOSEException;
|
||||
import com.nimbusds.jose.JWEAlgorithm;
|
||||
import com.nimbusds.jose.JWEHeader;
|
||||
import com.nimbusds.jose.JWEObject;
|
||||
import com.nimbusds.jose.JWSAlgorithm;
|
||||
|
||||
Reference in New Issue
Block a user