0
votes

I am trying to authenticate a Spring Boot app (created using jHipster with jwt authentication) from an Android client. What will be a standard procedure to follow. Here are the steps I am trying to implement:

  • Use Android form to capture user input of credentials (username and password)
  • Call spring security authentication endpoint with user credentials
  • Get jwt token from server and save it in the local storage (SQLite in my case)
  • Every time the Android app calls a REST endpoint, send jwt token with the request.

Any help/suggestion appreciated.

1

1 Answers

1
votes

if this solution works for you, you can do it this way!

If you want to do it "better" (mind, what better means), you can use the UAA or OAuth2 option on JHipster (if you are using microservices). This provides a OAuth2 solution, which has the advantage, you must not implement security flows on your own (as you do), but rely on standard implementations, which do exist for android.