AuthCentral API endpoints introduction
Here’s a quick overview of the key endpoints available in AuthCentral:
1. Access Tokens
-
Get Access Token
- Endpoint:
POST /api/v1/accessToken - Description: Used to obtain an access token.
- Headers:
Content-Type: application/json,auth-token: (special BE to BE token) - Body:
{"redirectUrlOnSuccess": "string","redirectUrlOnFail": "string"}
- Endpoint:
-
Retrieve Access Token by ID
- Endpoint:
GET /public/api/v1/accessToken/{id} - Description: Retrieve the access token details using its ID.
- Endpoint:
2. Sessions
- Refresh Session
- Endpoint:
POST /api/v1/sessions/refresh/{token} - Description: Refresh an existing session token.
- Headers:
Authorization: Bearer your_refresh_token
- Endpoint:
3. Login
- User Login
- Endpoint:
POST /public/api/v1/login - Description: Authenticate a user and initiate a session.
- Headers:
Content-Type: application/json - Body:
{"ip": {"value": "string"},"userAgent": "string","email": {"value": "string"},"password": "string"}
- Endpoint:
4. Web3
-
Signature Verification
- Endpoint:
POST /public/api/v1/web3/signature - Description: Verify a Web3 signature.
- Endpoint:
-
Create Web3 Account
- Endpoint:
POST /public/api/v1/web3/create - Description: Create a new Web3 account.
- Endpoint:
-
Authenticate Web3
- Endpoint:
POST /public/api/v1/web3/authenticate - Description: Authenticate using Web3 credentials.
- Endpoint:
5. Users
-
Check if User Exists
- Endpoint:
POST /public/api/v1/users/exists - Description: Check whether a user exists.
- Endpoint:
-
Check Password Strength
- Endpoint:
POST /public/api/v1/users/checkPasswordStrength - Description: Validate password strength.
- Endpoint:
-
Create User
- Endpoint:
POST /public/api/v1/users/create - Description: Create a new user.
- Endpoint:
-
Get User Info (Private)
- Endpoint:
GET /private/api/v1/users - Description: Retrieve information about the current authenticated user.
- Endpoint:
6. Admin
-
Admin Login
- Endpoint:
POST /admin/api/v1/login - Description: Admin login to manage the application.
- Endpoint:
-
Admin Session Refresh
- Endpoint:
POST /admin/api/v1/sessions/refresh - Description: Refresh an admin session.
- Endpoint:
Usage Notes
- Public Endpoints (
/public) are accessible without an authentication token and are primarily used for initiating login or sign-up processes. - Private Endpoints (
/private) require a valid authentication token to access protected resources. - Ensure to handle token expiration and refreshing appropriately using the
/api/v1/sessions/refreshendpoint.
Swagger Documentation
For the full list of available endpoints, visit the Swagger documentation page.