Basic flow in Spring Security Token based Authentication
- For the first time you have to use HTTP basic authentication and then login (send username/password) and this will return the token.
- In subsequent request you will use this token for authentication.
- You will have to add a filter to the chain that will do that authentication based on a token.
You have to come up with a token format and encryption for same. You ideally need to keep an expiry for the token too, expiry along with username could be a part of the token.Use cryptographic hash function like MD 5 and get hash of the whole Token.