java - What is the right way to make Spring boot authentication for mobile clients? -
i need make simple crud application user registration , authentication using spring boot, have trouble figuring out how right. have created user
table @ rdms , set redis storing user sessions explained here.
at spring boot docs it's said
if spring security on classpath web applications secure default ‘basic’ authentication on http endpoints.
but defined several crudrepository
intefaces , after starting application can get
it's data using browser without authentication. thought should work out of box without additional tuning , therefore checked if spring security on classpath gradlew dependencies
command , appears there:
also default user password should displayed during application start not show up. maybe missing here?
also not sure if best option mobile app because possibly uses short-living tokens. there several other options, among using webview , cookies (as recommended google long ago), creating custom authentication entry point, using approach used in angular web app , stateless authentication oauth 2.0. directly in opposite author of angular web app tutorial claims
the main point take on board here security stateful. can’t have secure, stateless application.
so how need pass token? how long should live? need make additional xsrf token or not? should use out of box solution or implement own one? can make stateless?
Comments
Post a Comment