Auth
Github Repository | Gitee Repository
Introduction
Auth is based on Spring Boot of OAuth2.0 User Center . Provide OAuth2.0 authorization and management services, as well as management including users, applications, roles and permissions. Provide Restful interface and OpenAPI documentation.
Provide a front-end page based on Vue & Quasar . Support microservice deployment.
Supported authorization mode
- Authorization code mode authorization_code ✔
- Client credential mode client_credentials ✔
- Implicit authorization mode implicit ✔
- Token refresh refresh_token ✔
- Password mode password (not enabled by default, if you need to enable it, you can create an authorization mode.)
rear end
- Realize the front-end and back-end separation architecture by rewriting the Endpoint in Spring Security OAuth2 , and use Redis to store Token, authorization code, verification code, etc.
- Based on MySQL & MyBatis, services including user management, application management, authority and role management are realized.
- File storage is achieved through third-party services (supporting local storage at the same time), and login and registration interfaces are verified through Google reCAPTCHA human-machine identification.
- Use Spring Doc & Swagger-UI to generate OpenAPI documentation and API debugging pages.
OAuth2 endpoint
Features | URL | method |
---|---|---|
Issue OAuth token | /v1/oauth/token | POST |
Destroy token | /v1/token | DELETE |
Check token | /v1/token/validity | GET / POST |
Authorization | - | - |
Since the back-end service only provides the Restful interface, the authorization page is provided by the front-end.
front end
- Based on the Vue & Quasar framework.
- Use OpenAPI Generator to generate Typescript Axios SDK.
- Internationalization (Chinese and English) & adaptive.
Features | URL | |
---|---|---|
Authorization | /authorize | Implicit authorization example (implicit) |
Key words
- OAuth2.0 Authorization Center
- Stateless
- Role permissions (RBAC)
Show off
Front end display
Including login registration, application authorization, personal information management, application management, user management and system settings.
Implicit authorization example (implicit)
You can log in with the following test accounts, which have test permissions and developer permissions.
username | password |
---|---|
test_user | 123456 |
aaaaaa | 123456 |
bbbbbb | 123456 |
- For the purpose of function display, the test account has the permission to view all user information. If you plan to register an account, your email address may be seen by others.
- If these tests are unavailable account, please create Issue contact me.
Interface browse
Open API | URL |
---|---|
JSON | https://api.dustlight.cn/v1/api-doc |
YAML | https://api.dustlight.cn/v1/api-doc.yaml |
Back-end interface browsing and debugging:
Go to view (Swagger UI)