Class AuthService

java.lang.Object
com.bytedesk.core.rbac.auth.AuthService

@Service public class AuthService extends Object
https://www.baeldung.com/get-user-in-spring-security
  • Field Details

    • userDetailsService

      private final UserDetailsServiceImpl userDetailsService
    • modelMapper

      private final org.modelmapper.ModelMapper modelMapper
    • uidUtils

      private final UidUtils uidUtils
    • tokenRepository

      private final TokenRepository tokenRepository
    • passwordEncoder

      private final org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder passwordEncoder
  • Constructor Details

    • AuthService

      public AuthService()
  • Method Details

    • getUser

      public UserEntity getUser()
    • getCurrentUser

      public UserEntity getCurrentUser()
    • getAuthentication

      public org.springframework.security.authentication.UsernamePasswordAuthenticationToken getAuthentication(@NonNull jakarta.servlet.http.HttpServletRequest request, String subject)
    • authenticationWithMobileAndPlatform

      public AuthToken authenticationWithMobileAndPlatform(String mobile, String platform, String client, String device)
    • authenticationWithEmailAndPlatform

      public AuthToken authenticationWithEmailAndPlatform(String email, String platform, String client, String device)
    • formatResponse

      public AuthResponse formatResponse(org.springframework.security.core.Authentication authentication)
    • authenticateWithPasswordHash

      public org.springframework.security.core.Authentication authenticateWithPasswordHash(AuthRequest authRequest)
      密码哈希登录 - 支持AES解密 前端使用AES加密密码,后端解密后验证