A
A
artshelom2018-07-30 21:21:55
Java
artshelom, 2018-07-30 21:21:55

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

I can't understand what they had when they wrote authorization. After all, if entering a login and password, then this is authentication, or did they mean logging in through Oauth2, wouldn't that be authentication too ??

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2018-07-30
@xmoonlight

Read .
and how to do

A
Alexey Cheremisin, 2018-07-30
@leahch

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 question

Ask a Question

731 491 924 answers to any question