APISonar


org.springframework.credhub.support.CredentialType.JSON

> org > springframework > credhub > support > CredentialType > JSON
org APIs springframework APIs credhub APIs support APIs CredentialType APIs JSON APIs

Example 1
private void stubCredentials(String expectedPath, String name, String key,
			String value) {
		SimpleCredentialName credentialsName = new SimpleCredentialName(
				expectedPath + "/" + name);
		when(this.credhubCredentialOperations.findByPath(expectedPath))
				.thenReturn(singletonList(new CredentialSummary(credentialsName)));
		JsonCredential credentials = new JsonCredential();
		credentials.put(key, value);
		when(this.credhubCredentialOperations.getByName(
				new SimpleCredentialName(expectedPath + "/" + name),
				JsonCredential.class))
						.thenReturn(new CredentialDetails<>("id1", credentialsName,
								CredentialType.JSON, credentials));
	}