5deda2a004
- 승인관리 완전삭제 기능 추가 - DJBank로 명칭 업데이트
128 lines
3.9 KiB
JSON
128 lines
3.9 KiB
JSON
{
|
|
"openapi": "3.0.0",
|
|
"info": {
|
|
"title": "DJBank OAuth 2.0 토큰 발급",
|
|
"description": "OAuth 2.0 토큰 발급을 위한 API 문서입니다.",
|
|
"version": "1.0.0"
|
|
},
|
|
"security": [
|
|
{
|
|
"clientCredentials": []
|
|
}
|
|
],
|
|
"components": {
|
|
"securitySchemes": {
|
|
"clientCredentials": {
|
|
"type": "oauth2",
|
|
"flows": {
|
|
"clientCredentials": {
|
|
"tokenUrl": "/api/v1/oauth/token",
|
|
"scopes": {
|
|
"api": "API 접근 권한"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"paths": {
|
|
"/api/v1/oauth/token": {
|
|
"post": {
|
|
"summary": "DJBank 액세스 토큰 발급",
|
|
"description": "client_credentials grant type을 사용하여 액세스 토큰을 발급받습니다.",
|
|
"security": [
|
|
{
|
|
"clientCredentials": ["api"]
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/x-www-form-urlencoded": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": ["grant_type", "client_id", "client_secret", "scope"],
|
|
"properties": {
|
|
"grant_type": {
|
|
"type": "string",
|
|
"enum": ["client_credentials"],
|
|
"description": "권한 부여 방식 (client_credentials)"
|
|
},
|
|
"client_id": {
|
|
"type": "string",
|
|
"maxLength": 256,
|
|
"description": "DJBank에서 발급한 client id"
|
|
},
|
|
"client_secret": {
|
|
"type": "string",
|
|
"maxLength": 512,
|
|
"description": "DJBank에서 발급한 client secret"
|
|
},
|
|
"scope": {
|
|
"type": "string",
|
|
"maxLength": 1024,
|
|
"description": "해당 업무의 Access Token 권한 범위",
|
|
"default": "api"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "토큰 발급 성공",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_token": {
|
|
"type": "string",
|
|
"maxLength": 600,
|
|
"description": "JWT 형식의 액세스 토큰"
|
|
},
|
|
"token_type": {
|
|
"type": "string",
|
|
"maxLength": 6,
|
|
"enum": ["bearer"],
|
|
"description": "토큰 타입"
|
|
},
|
|
"expires_in": {
|
|
"type": "integer",
|
|
"maxLength": 11,
|
|
"description": "토큰 만료 시간(초)"
|
|
},
|
|
"scope": {
|
|
"type": "string",
|
|
"maxLength": 1024,
|
|
"description": "부여된 scope"
|
|
},
|
|
"jti": {
|
|
"type": "string",
|
|
"maxLength": 256,
|
|
"description": "JWT ID"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
|
|
"token_type": "bearer",
|
|
"expires_in": 86399,
|
|
"scope": "api",
|
|
"jti": "e76ea359-81ee-4335-8703-4bb5f1937634"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "잘못된 요청"
|
|
},
|
|
"401": {
|
|
"description": "인증 실패"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |