Posts

Showing posts from February, 2025

Authentication and Authorization

Image
Authentication and Authorization Authentication and Authorization are two main important concepts in the world of security, mainly when it comes to accessing online services, apps, or systems. As authorization and authentication looks similar but they serve different purposes. Let's dive into authentication and authorization. 1. Authentication - "Who are you?" Authentication is the process of verifying the identity of a user or a system. When you log into a website or an app, you provide some form of identification like a username and password. The system then checks whether the information matches the credentials stored in its database. If it matches, you’re authenticated and allowed to proceed. There are several methods of authentication such as; Username and password : The most basic form where you enter a password to prove your identity. Two-factor authentication : You use something you know (password) plus something you have (a one-time code sent to your phone) to l...

OOP Concepts in Java.

Image
 OOP ( Object Oriented Programming ) In OOP, the two main aspects are methods and classes. If we assume like this, class as fruit and the objects as types of fruits such as orange, grapes, apple etc..... This clearly gives an idea that class is a blueprint or template of an object and object is an instance of a class. class---> Fruit objects ---> Orange, Apple, Grapes etc.... In OOP, there are main 04 concepts, they are as below; Encapsulation Inheritance Abstraction Polymorphism 01 Encapsulation The meaning of Encapsulation is to make sure that sensitive data is hidden from the users, to achieve this you must; declare class variables and attributes as private provide public get and set methods to access and update the value of a private variables The Get method return the variable value and the Set method set the value Example:-  public class Person {     private String name;           public String getName() {     ...