Answer the question
In order to leave comments, you need to log in
Authorization or authentication in the test task??
Hello. The company gave a test task, I can’t understand what they meant:
Authorization through the service: Google
Answer the question
In order to leave comments, you need to log in
You need to do oauth2 authentication. And attach authorization to it, for example, from a file or a database.
Authentication is a mechanism for identifying a user. Authorization, a mechanism for determining user rights.
For example. When I enter a login/password - authentication, the system recognizes me and verifies that the login/password is correct. But when I go to the admin url, authorization occurs, the system gives me access to a closed resource, for example, it checks if the user has the role of administrator, customer, is he registered in the system, etc.
You can start with pac4j and/or apache shiro. And there and there there are examples for Google and for many frameworks. I recommend, for a quick start, with apache shiro!
And if you need nothing but authentication and social networks, then look at java scribe - this is a social network authentication library.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question