Skip to content
프로젝트

소개

This repository contains a simple Java Spring project that implements authentication and authorization using Spring Security

보안 및 개인정보 보호

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Authentication API

Java Spring Postgres JWT

This project is an API built using Java, Java Spring, Flyway Migrations, PostgresSQL as the database, and Spring Security and JWT for authentication control.

The API was developed for my Youtube Tutorial, to demonstrate how to configure Authenticatio and Authorization in Spring application using Spring Security.

Table of Contents

Installation

  1. Clone the repository:
git clone https://github.com/Fernanda-Kipper/auth-api.git
  1. Install dependencies with Maven

  2. Install PostgresSQL

Usage

  1. Start the application with Maven
  2. The API will be accessible at http://localhost:8080

API Endpoints

The API provides the following endpoints:

GET /product - Retrieve a list of all products. (all authenticated users)

POST /product - Register a new product (ADMIN access required).

POST /auth/login - Login into the App

POST /auth/register - Register a new user into the App

Authentication

The API uses Spring Security for authentication control. The following roles are available:

USER -> Standard user role for logged-in users.
ADMIN -> Admin role for managing partners (registering new partners).

To access protected endpoints as an ADMIN user, provide the appropriate authentication credentials in the request header.

Database

The project utilizes PostgresSQL as the database. The necessary database migrations are managed using Flyway.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request to the repository.

When contributing to this project, please follow the existing code style, commit conventions, and submit your changes in a separate branch.

관련 프로젝트 살펴보기

불러오는 중…