leecoop / spring-microservices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ports

Application Port
Users Service rand (0) ...
Spring Cloud Config Server 8888
Netflix Eureka Naming Server 8761
Netflix Zuul API Gateway Server 8765
Zipkin Distributed Tracing Server 9411

Authentication proccess:

  1. AuthenticationFilter.attemptAuthentication

    • extract loginRequest
    • generate UsernamePasswordAuthenticationToken
      • provide email and password
  2. UserServiceImpl.loadUserByUsername

    • load user from DB by emal
    • if not exist
      • throw exception
    • else
      • return security.core.userdetails.User instance with email and encryptedPassword
  3. AuthenticationFilter.successfulAuthentication

    • extract emal from authResult
    • load user entity from db
    • generate JWT token
    • append token and userId to response header

spring-microservices.png spring-microservices-cloud-bus.png spring-cloud-config-server-kafka-bus.png spring-microservices-prop-files.png

About


Languages

Language:Java 96.8%Language:Dockerfile 3.2%