This repository contains three separate Spring projects demonstrating various authentication mechanisms:
authentication
: Demonstrates basic authentication.oauth_auth
: The Spring authorization server for OAuth2.resource_server
: The resource server for OAuth2.
This project demonstrates how to implement basic authentication using Spring Security.
- Clone the repository:
git clone https://github.com/yourusername/spring_authentications.git cd spring_authentications/authentication
- Build the project:
mvn clean install
- Run the application:
mvn spring-boot:run
- Access the application at
http://localhost:8080
. - Use the following credentials to log in:
- Username:
user
- Password:
password
- Username:
This project sets up an OAuth2 Authorization Server using Spring Authorization Server.
- Clone the repository:
git clone https://github.com/yourusername/spring_authentications.git cd spring_authentications/oauth_auth
- Build the project:
mvn clean install
- Run the application:
mvn spring-boot:run
- The authorization server will be available at
http://localhost:9000
. - Configure your OAuth2 clients and users in the application properties or in the database.
This project sets up a Resource Server that validates tokens issued by the OAuth2 Authorization Server.
- Clone the repository:
git clone https://github.com/yourusername/spring_authentications.git cd spring_authentications/resource_server
- Build the project:
mvn clean install
- Run the application:
mvn spring-boot:run
- The resource server will be available at
http://localhost:8000
. - Use a valid OAuth2 token to access protected resources.
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to submit issues and pull requests. For major changes, please open an issue first to discuss what you would like to change.
feel free to connect contact.alquama@gmail.com.