Skip to content

Commit

Permalink
warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
strehle committed May 14, 2024
1 parent a0a0a93 commit 901f218
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ IdentityProvider<LdapIdentityProviderDefinition> getLdapDefinition() {
}

@Test
void retrieve_oauth_provider_by_id_redacts_password() throws Exception {
void retrieve_oauth_provider_by_id_redacts_password() {
retrieve_oauth_provider_by_id("", OriginKeys.OAUTH20);
retrieve_oauth_provider_by_id("", OriginKeys.OIDC10);
}
Expand All @@ -188,7 +188,7 @@ IdentityProvider<LdapIdentityProviderDefinition> retrieve_oauth_provider_by_id(S
}

@Test
void retrieve_ldap_provider_by_id_redacts_password() throws Exception {
void retrieve_ldap_provider_by_id_redacts_password() {
retrieve_ldap_provider_by_id("");
}

Expand All @@ -208,15 +208,15 @@ IdentityProvider<LdapIdentityProviderDefinition> retrieve_ldap_provider_by_id(St
void remove_bind_password() {
remove_sensitive_data(() -> getLdapDefinition(),
LDAP,
(spy) -> verify((LdapIdentityProviderDefinition) spy, times(1)).setBindPassword(isNull()));
spy -> verify((LdapIdentityProviderDefinition) spy, times(1)).setBindPassword(isNull()));
}

@Test
void remove_client_secret() {
for (String type : Arrays.asList(OIDC10, OAUTH20)) {
remove_sensitive_data(() -> getExternalOAuthProvider(),
type,
(spy) -> verify((AbstractExternalOAuthIdentityProviderDefinition) spy, times(1)).setRelyingPartySecret(isNull()));
spy -> verify((AbstractExternalOAuthIdentityProviderDefinition) spy, times(1)).setRelyingPartySecret(isNull()));
}
}

Expand Down Expand Up @@ -716,7 +716,6 @@ void testDeleteIdpWithAlias() {
void testDeleteIdpWithAlias_DanglingReference() {
final String idpId = UUID.randomUUID().toString();
final String aliasIdpId = UUID.randomUUID().toString();
final String customZoneId = UUID.randomUUID().toString();

final IdentityProvider<?> idp = new IdentityProvider<>();
idp.setType(OIDC10);
Expand Down Expand Up @@ -753,7 +752,6 @@ void testDeleteIdpWithAlias_AliasFeatureDisabled() {
identityProviderEndpoints.setApplicationEventPublisher(mockEventPublisher);

// arrange IdP with alias exists
final String customZoneId = UUID.randomUUID().toString();
final Pair<IdentityProvider<?>, IdentityProvider<?>> idpAndAlias = arrangeIdpWithAliasExists(UAA, customZoneId);
final IdentityProvider<?> idp = idpAndAlias.getLeft();

Expand Down

0 comments on commit 901f218

Please sign in to comment.