@Test public void createIdentity() { UserIdentityDO userIdentity = userIdentityService.createIdentity( 1L, IdentityConsts.USERNAME_PASSWORD_IDENTITY, "pedro", EncryptUtil.encrypt("123456") ); assertNotNull(userIdentity.getId()); assertTrue(EncryptUtil.verify(userIdentity.getCredential(), "123456")); }
@Override public UserIdentityDO createIdentity(Long userId, String identityType, String identifier, String credential) { UserIdentityDO userIdentity = new UserIdentityDO(); userIdentity.setUserId(userId); userIdentity.setIdentityType(identityType); userIdentity.setIdentifier(identifier); userIdentity.setCredential(credential); return this.createIdentity(userIdentity); }
UserIdentityServiceImpl extends ServiceImpl<UserIdentityMapper, UserIdentityDO> implements UserIdentityService { @Override public UserIdentityDO createIdentity(Long userId, String identityType, String identifier, String credential) { UserIdentityDO userIdentity = new UserIdentityDO(); userIdentity.setUserId(userId); userIdentity.setIdentityType(identityType); userIdentity.setIdentifier(identifier); userIdentity.setCredential(credential); return this.createIdentity(userIdentity); } }
UserIdentityServiceImpl extends ServiceImpl<UserIdentityMapper, UserIdentityDO> implements UserIdentityService { @Override public UserIdentityDO createIdentity(Long userId, String identityType, String identifier, String credential) { UserIdentityDO userIdentity = new UserIdentityDO(); userIdentity.setUserId(userId); userIdentity.setIdentityType(identityType); userIdentity.setIdentifier(identifier); userIdentity.setCredential(credential); return this.createIdentity(userIdentity); }  }
UserIdentityServiceImpl extends ServiceImpl<UserIdentityMapper, UserIdentityDO> implements UserIdentityService { @Override public UserIdentityDO createIdentity(Long userId, String identityType, String identifier, String credential) { UserIdentityDO userIdentity = new UserIdentityDO(); userIdentity.setUserId(userId); userIdentity.setIdentityType(identityType); userIdentity.setIdentifier(identifier); userIdentity.setCredential(credential); return this.createIdentity(userIdentity); }  @Override UserIdentityDO createIdentity(Long userId, String identityType, String identifier, String credential); @Override UserIdentityDO createIdentity(UserIdentityDO userIdentity); @Override UserIdentityDO createUsernamePasswordIdentity(Long userId, String identifier, String credential); @Override boolean verifyUsernamePassword(Long userId, String username, String password); @Override boolean changePassword(Long userId, String password); @Override boolean changeUsername(Long userId, String username); @Override boolean changeUsernamePassword(Long userId, String username, String password); }
UserIdentityServiceImpl extends ServiceImpl<UserIdentityMapper, UserIdentityDO> implements UserIdentityService { @Override public UserIdentityDO createIdentity(Long userId, String identityType, String identifier, String credential) { UserIdentityDO userIdentity = new UserIdentityDO(); userIdentity.setUserId(userId); userIdentity.setIdentityType(identityType); userIdentity.setIdentifier(identifier); userIdentity.setCredential(credential); return this.createIdentity(userIdentity); }  @Override UserIdentityDO createIdentity(Long userId, String identityType, String identifier, String credential); @Override UserIdentityDO createIdentity(UserIdentityDO userIdentity); @Override UserIdentityDO createUsernamePasswordIdentity(Long userId, String identifier, String credential); @Override boolean verifyUsernamePassword(Long userId, String username, String password); @Override boolean changePassword(Long userId, String password); @Override boolean changeUsername(Long userId, String username); @Override boolean changeUsernamePassword(Long userId, String username, String password);  }