use of com.microsoft.azure.oidc.configuration.key.modulus.Modulus in project azure-tools-for-java by Microsoft.
the class SimpleKeyStoreParser method getKeys.
@Override
public Map<Name, Key> getKeys(final JsonNode node) {
if (node == null) {
throw new PreconditionException("Required parameter is null");
}
final Map<Name, Key> keys = new HashMap<Name, Key>();
for (final JsonNode n : node.get("keys")) {
final TimeStamp notBefore = timeStampFactory.createTimeStamp(n.has("nbf") ? n.get("nbf").asLong() : 0L);
final Name keyName = nameFactory.createKeyName(n.get("kid").asText());
final Modulus modulus = modulusFactory.createKeyValue(n.get("n").asText());
final Exponent exponent = exponentFactory.createKeyExponent(n.get("e").asText());
final Key key = keyFactory.createKey(notBefore, modulus, exponent);
keys.put(keyName, key);
}
return keys;
}
Aggregations