- Make Request to Endpoint
- Provide JWT (Google) Or Identifier (Username-Password)
- Validate Google JWT
- Check for Identity
- If exists => Return matching user
- If not exists
1. Check for User
- If exists create new Identity
- If not exists
1. Google => Create new User and new Identity
2. Username-Password
- Check for password validity and unique Username
- Create new User and new Identity Or throw ValidationException if condition from above returns false 2. Return User
- Create JWT for returned User
- Make Request
- Check for JWT in Authorization Header
- If missing => Throw Exception
- Check Signature and Expiration
- Signature Or Expiration invalid => Throw Exception
- Search user by JWT Payload subject
- If not found => Throw Exception
- Set user as current user in SecurityContextHolder
- Finish FilterChain
- Set current user to null