Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fryzcode/authenticationapi
The Authentication API provides methods for managing users and authentication processes.
https://github.com/fryzcode/authenticationapi
asp-net aspnet-web-api csharp
Last synced: 7 days ago
JSON representation
The Authentication API provides methods for managing users and authentication processes.
- Host: GitHub
- URL: https://github.com/fryzcode/authenticationapi
- Owner: fryzcode
- Created: 2024-01-11T08:54:41.000Z (10 months ago)
- Default Branch: refactor
- Last Pushed: 2024-02-05T11:37:50.000Z (10 months ago)
- Last Synced: 2024-08-25T11:36:54.444Z (3 months ago)
- Topics: asp-net, aspnet-web-api, csharp
- Language: C#
- Homepage:
- Size: 104 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Authentication API
The Authentication API provides methods for managing users and authentication processes.
## Methods
### 1. Register
Registers a new user in the system.
**Endpoint:** `POST /api/auth/register`
**Request Parameters:**
```json
{
"username": "exampleUser",
"email": "[email protected]",
"password": "password123",
"roles": ["user"]
}```
### 2. Login
Authenticate the user with their credentials.
**Endpoint:** `POST /api/auth/login`
**Request Parameters:**
```json
{
"username": "exampleUser",
"password": "password123"
}
```### 3. ConfirmEmail
Confirm the user's email address after registration.
**Endpoint:** `POST /api/auth/confirm-email`
**Request Parameters:**
```json
{
"email": "[email protected]",
"token": "confirmationToken123"
}
```### 4. LoginWithOTP
Authenticate the user using a one-time password (OTP).
**Endpoint:** `POST /api/auth/login-2FA`
**Request Parameters:**
```json
{
"username": "exampleUser",
"otp": "123456"
}
```### 5. RefreshToken
Refresh the access token using a refresh token.
**Endpoint:** `POST /api/auth/refresh-token`
**Request Parameters:**
```json
{
"accessToken": {
"token": "accessToken123",
"expiryTokenDate": "2024-02-05T11:30:26.187Z"
},
"refreshToken": {
"token": "refreshToken1234",
"expiryTokenDate": "2024-02-05T11:30:26.187Z"
}
}
```### 6. ForgotPassword
Initiate the user password recovery process.
**Endpoint:** `POST /api/auth/forgot-password`
**Request Parameters:**
```json
{
"email": "[email protected]"
}
```### 7. ResetPassword
Reset the user's password after a password reset request.
**Endpoint:** `POST /api/auth/reset-password`
**Request Parameters:**
```json
{
"password": "newPassword",
"confirmPassword": "confirmPassword",
"email": "[email protected]",
"token": "token123"
}
```## Notes