code: protected static boolean locateMatchingCredentialType(final Authentication authentication, final String credentialClassType) {
          return StringUtils.isNotBlank(credentialClassType) && authentication.getCredentials()
              .stream()
              .anyMatch(e -> e.getCredentialClass().getName().matches(credentialClassType));
      }
docs: Locate matching credential type boolean.
  
  @param authentication      the authentication
  @param credentialClassType the credential class type
  @return the boolean