com.macro.mall.bo.AdminUserDetails Java Examples
The following examples show how to use
com.macro.mall.bo.AdminUserDetails.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: UmsAdminServiceImpl.java From mall-swarm with Apache License 2.0 | 5 votes |
@Override public UserDetails loadUserByUsername(String username){ //获取用户信息 UmsAdmin admin = getAdminByUsername(username); if (admin != null) { List<UmsResource> resourceList = getResourceList(admin.getId()); return new AdminUserDetails(admin,resourceList); } throw new UsernameNotFoundException("用户名或密码错误"); }
Example #2
Source File: SecurityConfig.java From macrozheng with Apache License 2.0 | 5 votes |
@Bean public UserDetailsService userDetailsService() { //获取登录用户信息 return username -> { UmsAdmin admin = adminService.getAdminByUsername(username); if (admin != null) { List<UmsPermission> permissionList = adminService.getPermissionList(admin.getId()); return new AdminUserDetails(admin,permissionList); } throw new UsernameNotFoundException("用户名或密码错误"); }; }
Example #3
Source File: UmsAdminServiceImpl.java From mall with Apache License 2.0 | 5 votes |
@Override public UserDetails loadUserByUsername(String username){ //获取用户信息 UmsAdmin admin = getAdminByUsername(username); if (admin != null) { List<UmsResource> resourceList = getResourceList(admin.getId()); return new AdminUserDetails(admin,resourceList); } throw new UsernameNotFoundException("用户名或密码错误"); }
Example #4
Source File: SecurityConfig.java From macrozheng-mall with MIT License | 5 votes |
@Bean public UserDetailsService userDetailsService() { //获取登录用户信息 return username -> { UmsAdmin admin = adminService.getAdminByUsername(username); if (admin != null) { List<UmsPermission> permissionList = adminService.getPermissionList(admin.getId()); return new AdminUserDetails(admin,permissionList); } throw new UsernameNotFoundException("用户名或密码错误"); }; }