@Test public void getEmailConfigurationObfuscatesThePassword() { when(emailConfiguration.getPassword()).thenReturn("testpassword"); when(emailManager.getConfiguration()).thenReturn(emailConfiguration); ApiEmailConfiguration response = underTest.getEmailConfiguration(); assertThat(response.getPassword(), is(nullValue())); }
@GET @RequiresPermissions("nexus:settings:read") public ApiEmailConfiguration getEmailConfiguration() { return convert(emailManager.getConfiguration()); }
EmailConfigurationApiResource implements Resource, EmailConfigurationApiResourceDoc { @GET @RequiresPermissions("nexus:settings:read") public ApiEmailConfiguration getEmailConfiguration() { return convert(emailManager.getConfiguration()); } }
EmailConfigurationApiResource implements Resource, EmailConfigurationApiResourceDoc { @GET @RequiresPermissions("nexus:settings:read") public ApiEmailConfiguration getEmailConfiguration() { return convert(emailManager.getConfiguration()); } @Inject  EmailConfigurationApiResource(EmailManager emailManager); }
EmailConfigurationApiResource implements Resource, EmailConfigurationApiResourceDoc { @GET @RequiresPermissions("nexus:settings:read") public ApiEmailConfiguration getEmailConfiguration() { return convert(emailManager.getConfiguration()); } @Inject  EmailConfigurationApiResource(EmailManager emailManager); @GET @RequiresPermissions("nexus:settings:read") ApiEmailConfiguration getEmailConfiguration(); @PUT @Validate @RequiresAuthentication @RequiresPermissions("nexus:settings:update") void setEmailConfiguration(@NotNull @Valid final ApiEmailConfiguration apiEmailConfiguration); @POST @Path("/verify") @RequiresAuthentication @RequiresPermissions("nexus:settings:update") ApiEmailValidation testEmailConfiguration(@NotNull String verificationAddress); @DELETE @RequiresAuthentication @RequiresPermissions("nexus:settings:update") void deleteEmailConfiguration(); }
EmailConfigurationApiResource implements Resource, EmailConfigurationApiResourceDoc { @GET @RequiresPermissions("nexus:settings:read") public ApiEmailConfiguration getEmailConfiguration() { return convert(emailManager.getConfiguration()); } @Inject  EmailConfigurationApiResource(EmailManager emailManager); @GET @RequiresPermissions("nexus:settings:read") ApiEmailConfiguration getEmailConfiguration(); @PUT @Validate @RequiresAuthentication @RequiresPermissions("nexus:settings:update") void setEmailConfiguration(@NotNull @Valid final ApiEmailConfiguration apiEmailConfiguration); @POST @Path("/verify") @RequiresAuthentication @RequiresPermissions("nexus:settings:update") ApiEmailValidation testEmailConfiguration(@NotNull String verificationAddress); @DELETE @RequiresAuthentication @RequiresPermissions("nexus:settings:update") void deleteEmailConfiguration();  }