User service
Summary
The user service is responsible for the onboarding of users and provisioning JWT claims.
sequenceDiagram
participant A as UI
participant E as Entity
participant T as Topic
note over A,T: User signs up
A->>E: Register User
Note right of A: Database Validations
alt is valid
A->>E: Passwords is valid
A->>E: Email is new
else is invalid
E->>A: Email is taken
E->>A: Password < 9 chars
end
opt UserCreated
E->>T:
end
note over A,T: User logs in
A->>E: User Logged In
alt is valid
E->>A: JWT Claim with 2 hour expiration
else is invalid
E->>A: Email or password is incorrect
E->>A: Login has been disabled
end
note over A,T: User forgot password
A->>E: Forgot Password
E->>T: UserResetTokenCreated
note over A,T: Createing an Agency
A->>E: Create Agency
E->>T: Agency Created