瀏覽代碼

配置

tags/24080901
liuxinxin 1 年之前
父節點
當前提交
257ad6fc28
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. +5
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/credential/CredentialAuthProvider.java

+ 5
- 0
pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/credential/CredentialAuthProvider.java 查看文件

@@ -13,6 +13,8 @@ import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.crypto.password.PasswordEncoder;

import java.util.Objects;

/**
* @Author LiuXinXin
* @Date 2020/8/3 8:55 下午
@@ -44,6 +46,9 @@ public class CredentialAuthProvider implements AuthenticationProvider {
throw new BadCredentialsException("login fail! 浙政钉校验失败");
}
String accountId = accountResult.getData();
if (Objects.isNull(accountId)) {
throw new BadCredentialsException("login fail! 浙政钉校验失败");
}

user = userDetailsService.loadUserByUsername(accountId + UserDeatilsServiceConstant.USER_DETAILS_SERVICE_SEPARATOR + loginTypeEnum.name());
}


Loading…
取消
儲存