@Test public void getAllPubKeys() throws ParseException { Map<String,JWK> keys2check = service_2.getAllPublicKeys(); assertEquals( JSONObjectUtils.getString(RSAjwk.toPublicJWK().toJSONObject(), "e"), JSONObjectUtils.getString(keys2check.get(RSAkid).toJSONObject(), "e") ); assertEquals( JSONObjectUtils.getString(RSAjwk_2.toPublicJWK().toJSONObject(), "e"), JSONObjectUtils.getString(keys2check.get(RSAkid_2).toJSONObject(), "e") ); assertTrue(service_3.getAllPublicKeys().isEmpty()); }
@Override public Map<String, JWK> getAllPublicKeys() { Map<String, JWK> pubKeys = new HashMap<String, JWK>(); for (String keyId : keys.keySet()) { JWK key = keys.get(keyId); JWK pub = key.toPublicJWK(); if (pub != null) { pubKeys.put(keyId, pub); } } return pubKeys; }
DefaultJwtEncryptionAndDecryptionService implements JwtEncryptionAndDecryptionService { @Override public Map<String, JWK> getAllPublicKeys() { Map<String, JWK> pubKeys = new HashMap<String, JWK>(); for (String keyId : keys.keySet()) { JWK key = keys.get(keyId); JWK pub = key.toPublicJWK(); if (pub != null) { pubKeys.put(keyId, pub); } } return pubKeys; } }
DefaultJwtEncryptionAndDecryptionService implements JwtEncryptionAndDecryptionService { @Override public Map<String, JWK> getAllPublicKeys() { Map<String, JWK> pubKeys = new HashMap<String, JWK>(); for (String keyId : keys.keySet()) { JWK key = keys.get(keyId); JWK pub = key.toPublicJWK(); if (pub != null) { pubKeys.put(keyId, pub); } } return pubKeys; } DefaultJwtEncryptionAndDecryptionService(Map<String, JWK> keys);  DefaultJwtEncryptionAndDecryptionService(JWKSetKeyStore keyStore); }
DefaultJwtEncryptionAndDecryptionService implements JwtEncryptionAndDecryptionService { @Override public Map<String, JWK> getAllPublicKeys() { Map<String, JWK> pubKeys = new HashMap<String, JWK>(); for (String keyId : keys.keySet()) { JWK key = keys.get(keyId); JWK pub = key.toPublicJWK(); if (pub != null) { pubKeys.put(keyId, pub); } } return pubKeys; } DefaultJwtEncryptionAndDecryptionService(Map<String, JWK> keys);  DefaultJwtEncryptionAndDecryptionService(JWKSetKeyStore keyStore); @PostConstruct void afterPropertiesSet(); String getDefaultEncryptionKeyId(); void setDefaultEncryptionKeyId(String defaultEncryptionKeyId); String getDefaultDecryptionKeyId(); void setDefaultDecryptionKeyId(String defaultDecryptionKeyId); JWEAlgorithm getDefaultAlgorithm(); void setDefaultAlgorithm(JWEAlgorithm defaultAlgorithm); @Override void encryptJwt(JWEObject jwt); @Override void decryptJwt(JWEObject jwt); @Override Map<String, JWK> getAllPublicKeys(); @Override Collection<JWEAlgorithm> getAllEncryptionAlgsSupported(); @Override Collection<EncryptionMethod> getAllEncryptionEncsSupported(); }
DefaultJwtEncryptionAndDecryptionService implements JwtEncryptionAndDecryptionService { @Override public Map<String, JWK> getAllPublicKeys() { Map<String, JWK> pubKeys = new HashMap<String, JWK>(); for (String keyId : keys.keySet()) { JWK key = keys.get(keyId); JWK pub = key.toPublicJWK(); if (pub != null) { pubKeys.put(keyId, pub); } } return pubKeys; } DefaultJwtEncryptionAndDecryptionService(Map<String, JWK> keys);  DefaultJwtEncryptionAndDecryptionService(JWKSetKeyStore keyStore); @PostConstruct void afterPropertiesSet(); String getDefaultEncryptionKeyId(); void setDefaultEncryptionKeyId(String defaultEncryptionKeyId); String getDefaultDecryptionKeyId(); void setDefaultDecryptionKeyId(String defaultDecryptionKeyId); JWEAlgorithm getDefaultAlgorithm(); void setDefaultAlgorithm(JWEAlgorithm defaultAlgorithm); @Override void encryptJwt(JWEObject jwt); @Override void decryptJwt(JWEObject jwt); @Override Map<String, JWK> getAllPublicKeys(); @Override Collection<JWEAlgorithm> getAllEncryptionAlgsSupported(); @Override Collection<EncryptionMethod> getAllEncryptionEncsSupported();  }