ashishl
ashishl

Reputation: 203

Java Authentication and Authorization

Can anyone comment on this scenario belong to authentication or authorization

Authentication : User is logging with username & password - called authentication.

Authorization : User has some role - called authorization.

If I have only username and user Id and want to check from DB what it called ? Authorization or Authentication ?

Could anyone comment on this ?

Thanks

Upvotes: 0

Views: 276

Answers (1)

Niklas P
Niklas P

Reputation: 3507

Authentication is the check if someone is the person he/she says he/she is (e.g. by asking for a password). Authorization is the check if someone has the right to do something.

So in your case that database isn't able to check authentication. If the information about what the user is allowed to do can be extracted from the data within the database then this'd be authorization.

Upvotes: 1

Related Questions