https://github.com/exo-portal/exo-auth
Exo Auth is the authentication service for Exo, supporting HttpOnly cookies, JWT, and OAuth for secure and flexible user authentication. It ensures robust access control and seamless integration across Exo services.
https://github.com/exo-portal/exo-auth
authentication authorization backend java maven oauth2 spring spring-boot spring-security sql yml
Last synced: 3 months ago
JSON representation
Exo Auth is the authentication service for Exo, supporting HttpOnly cookies, JWT, and OAuth for secure and flexible user authentication. It ensures robust access control and seamless integration across Exo services.
- Host: GitHub
- URL: https://github.com/exo-portal/exo-auth
- Owner: exo-portal
- Created: 2025-05-12T13:53:06.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-26T16:16:27.000Z (12 months ago)
- Last Synced: 2025-06-26T17:26:51.072Z (12 months ago)
- Topics: authentication, authorization, backend, java, maven, oauth2, spring, spring-boot, spring-security, sql, yml
- Language: Java
- Homepage:
- Size: 98.6 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Exo Auth
Exo(Employee eXperience Organization) Auth is the authentication service for Exo, supporting HttpOnly cookies, JWT, and OAuth for secure and flexible user authentication. It ensures robust access control and seamless integration across Exo services.
---
## Features
- **HttpOnly Cookies**: Secure session management to prevent XSS attacks.
- **JWT**: Stateless authentication for scalable and efficient user sessions.
- **OAuth**: Third-party authentication for seamless user onboarding.
- **Access Control**: Role-based and permission-based access management.
- **Integration**: Designed for seamless integration across Exo services.
---
## Benefits
- **Enhanced Security**: Protects user data with industry-standard authentication mechanisms.
- **Scalability**: Supports stateless authentication for high-performance applications.
- **Flexibility**: Offers multiple authentication methods to suit diverse requirements.
- **Consistency**: Ensures uniform authentication across all Exo services.
---
## Tech Stack
-  **Java**
-  **Spring Boot**
-  **Maven**
-  **MySQL**
-  **JWT**
-  **OAuth**
-  **Git**
-  **Microservices**
---
## Getting Started
### Prerequisites
- **Java**: Ensure Java is installed (version 17 or higher recommended).
- **Maven**: Build and manage dependencies using Maven.
---
### Installation
Add the following dependency to your `pom.xml`:
```xml
com.exodia_portal
exo-auth
1.0.0
```
---
## Setup
### Configuring `application.yml`
To set up the application, create an `application.yml` file in the `src/main/resources` directory with the following structure:
```yaml
spring:
security:
oauth2:
client:
registration:
google:
client-id: ${GOOGLE_CLIENT_ID}
client-secret: ${GOOGLE_CLIENT_SECRET}
scope: profile, email
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
github:
client-id: ${GITHUB_CLIENT_ID}
client-secret: ${GITHUB_CLIENT_SECRET}
scope: read:user, user:email
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
datasource:
name: dev-server
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/exo-portal
username: ${DB_USERNAME}
password: ${DB_PASSWORD}
jpa:
hibernate:
ddl-auto: update
show-sql: "true"
database-platform: org.hibernate.dialect.MySQL8Dialect
server:
port: 8080
jwt:
secret: ${JWT_SECRET}
access:
expiration: 3600000
refresh:
expiration: 86400000
```
---
**Environment Variables**
| Variable Name | Description |
|-----------------------|--------------------------------------|
| `GOOGLE_CLIENT_ID` | Google OAuth client ID |
| `GOOGLE_CLIENT_SECRET`| Google OAuth client secret |
| `GITHUB_CLIENT_ID` | GitHub OAuth client ID |
| `GITHUB_CLIENT_SECRET`| GitHub OAuth client secret |
| `DB_USERNAME` | MySQL database username |
| `DB_PASSWORD` | MySQL database password |
| `JWT_SECRET` | Secret key for signing JWT tokens |