@Test void matches() { String password = "password"; String encodedPassword = "encoded-password"; BCryptPasswordEncoder bCryptPasswordEncoder = mock(BCryptPasswordEncoder.class); when(bCryptPasswordEncoder.matches(password, encodedPassword)).thenReturn(true); assertTrue( new MolgenisPasswordEncoder(bCryptPasswordEncoder).matches(password, encodedPassword)); }
@Override public boolean matches(CharSequence rawPassword, String encodedPassword) { return bCryptPasswordEncoder.matches(rawPassword, encodedPassword); }
MolgenisPasswordEncoder implements PasswordEncoder { @Override public boolean matches(CharSequence rawPassword, String encodedPassword) { return bCryptPasswordEncoder.matches(rawPassword, encodedPassword); } }
MolgenisPasswordEncoder implements PasswordEncoder { @Override public boolean matches(CharSequence rawPassword, String encodedPassword) { return bCryptPasswordEncoder.matches(rawPassword, encodedPassword); } MolgenisPasswordEncoder(BCryptPasswordEncoder bCryptPasswordEncoder); }
MolgenisPasswordEncoder implements PasswordEncoder { @Override public boolean matches(CharSequence rawPassword, String encodedPassword) { return bCryptPasswordEncoder.matches(rawPassword, encodedPassword); } MolgenisPasswordEncoder(BCryptPasswordEncoder bCryptPasswordEncoder); @Override String encode(CharSequence rawPassword); @Override boolean matches(CharSequence rawPassword, String encodedPassword); }
MolgenisPasswordEncoder implements PasswordEncoder { @Override public boolean matches(CharSequence rawPassword, String encodedPassword) { return bCryptPasswordEncoder.matches(rawPassword, encodedPassword); } MolgenisPasswordEncoder(BCryptPasswordEncoder bCryptPasswordEncoder); @Override String encode(CharSequence rawPassword); @Override boolean matches(CharSequence rawPassword, String encodedPassword);  }