feat: initial auth service support
This commit is contained in:
parent
d0c3547ef6
commit
2929a6e4bc
10 changed files with 937 additions and 0 deletions
112
auth/openapi-auth.yaml
Normal file
112
auth/openapi-auth.yaml
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
openapi: 3.1.0
|
||||
info:
|
||||
title: Auth Service
|
||||
version: 1.0.0
|
||||
|
||||
paths:
|
||||
/auth/sign-up:
|
||||
post:
|
||||
summary: Sign up a new user
|
||||
tags: [Auth]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required: [nickname, pass]
|
||||
properties:
|
||||
nickname:
|
||||
type: string
|
||||
pass:
|
||||
type: string
|
||||
format: password
|
||||
responses:
|
||||
"200":
|
||||
description: Sign-up result
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
error:
|
||||
type: string
|
||||
nullable: true
|
||||
user_id:
|
||||
type: string
|
||||
nullable: true
|
||||
|
||||
/auth/sign-in:
|
||||
post:
|
||||
summary: Sign in a user and return JWT
|
||||
tags: [Auth]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required: [nickname, pass]
|
||||
properties:
|
||||
nickname:
|
||||
type: string
|
||||
pass:
|
||||
type: string
|
||||
format: password
|
||||
responses:
|
||||
"200":
|
||||
description: Sign-in result with JWT
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
success:
|
||||
type: boolean
|
||||
error:
|
||||
type: string
|
||||
nullable: true
|
||||
user_id:
|
||||
type: string
|
||||
nullable: true
|
||||
token:
|
||||
type: string
|
||||
description: JWT token to access protected endpoints
|
||||
nullable: true
|
||||
|
||||
/auth/verify-token:
|
||||
post:
|
||||
summary: Verify JWT validity
|
||||
tags: [Auth]
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
required: [token]
|
||||
properties:
|
||||
token:
|
||||
type: string
|
||||
description: JWT token to validate
|
||||
responses:
|
||||
"200":
|
||||
description: Token validation result
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
valid:
|
||||
type: boolean
|
||||
description: True if token is valid
|
||||
user_id:
|
||||
type: string
|
||||
nullable: true
|
||||
description: User ID extracted from token if valid
|
||||
error:
|
||||
type: string
|
||||
nullable: true
|
||||
description: Error message if token is invalid
|
||||
Loading…
Add table
Add a link
Reference in a new issue