├── .DS_Store ├── README.md ├── auth.png ├── doc └── 우리은행_오픈API_사용자인증_API명세서_v1.0.pdf └── swagger ├── 휴대폰인증발송_getCellCerti.json └── 휴대폰인증번호확인_executeCellCerti.json /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalwooribank/API_User_Auth/c25aa9a894d9fe337f2ab43f5de8fcb1893a7a2c/.DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # API_User_Auth (사용자인증 API서비스) 2 | 3 | 4 | _2021년 4월 21일 (Ver 0.3) update for Wooribank API_Hackathon 5 | 6 | > 사용자인증 API서비스 관련 설명서 7 | 8 | ### 1. 사용자인증 API 소개 9 | 10 | ---------- 11 | 12 | ##### 1.1 목적 13 | 14 | 본 문서는 우리은행의 사용자인증 API 연동을 통하여 사용자인증 서비스를 활용하는데 필요한 연동 규격을 설명한다. 15 | 16 | ##### 1.2 사용자인증 API 흐름도 17 | 18 | ![alt text](auth.png) 19 | 20 | 21 | 22 | 23 | ### 2. API Spec & Example 24 | 25 | ---------- 26 | 27 | ##### 2.1 휴대폰인증발송 HTTP Request 28 | 29 | ``` 30 | POST /oai/wb/v1/login/getCellCerti 31 | ``` 32 | 33 | ##### 2.2 Response Example 34 | 35 | ```json 36 | { 37 | "dataHeader": {}, 38 | "dataBody": { 39 | "CRTF_UNQ_NO": "MG66740190118579253569", 40 | "VCNT": "" 41 | } 42 | } 43 | ``` 44 | 45 | 46 | ### 3. Protocol Rule 47 | 48 | ---------- 49 | 50 | 우리은행 오픈API 연동 방식은 REST(Representational State Transfer) 방식에 따라 구현한다. HTTP Method 및 리소스에 대한 URL에 따라 Request와 Response 데이터 타입은 JSON을 사용한다. 51 | 또한 HTTP 1.1 Spec 규격을 따른다. 52 | 53 | ##### 3.1 Resource URL 54 | 55 | 우리은행 오픈API 서비스의 Request URL은 다음과 같다. 56 | ``` 57 | {HTTP_METHOD} http(s)://{host}:{port}/{directory}/{anyResource}?{Query} 58 | ``` 59 | 60 | 항목 | 설명 | 비교 61 | ---- | ---- | ---- 62 | http://{host}:{port} | Host Address와 port | 63 | /{directory} | Resource | /api/v1 64 | /{anyResource}?{Query} | {anyResource}: Logical resource
{Query}: Parameter | 65 | 66 | ※ 모든 데이터는 URL Encoding하여 전송해야 한다. 67 | 68 | ##### 3.2 Resource URL 69 | 70 | 우리은행의 오픈API 서비스는 기본적으로 자원 요청에 의해 리턴 되는 JSON(Content-Type: application/json) 및 HTML(Content-Type: text/html) Type만 사용한다. 71 | 72 | ##### 3.3 HTTP Method를 통한 Request Action 매핑 73 | 74 | 목록 및 상세정보 제공은 GET HTTP Method를 사용하며 수정은 PUT, PATCH를 사용하고 생성은 POST를 사용하고 삭제는 DELETE HTTP Method를 이용한다. 75 | 76 | HTTP Method | Action | 설명 | 비고 77 | ---- | ---- | ---- | ---- 78 | GET | Read | 리소스 획득 | 79 | PUT | Update/Modify | 리소스 변경 | 80 | POST | Create/New | 리소스 생성 | 81 | DELETE | Delete | 리소스 삭제 | 82 | 83 | ※ 필요에 따라 HTTP Method는 변경될 수 있음. 84 | 85 | ##### 3.4 Request HTTP Header 형태 86 | 87 | 우리은행 오픈API는 등록된 사용자 여부를 확인 하기 위하여 “appKey”와 “secretKey”를 HTTP Header에 적용하여야 하며, 인증은 OAuth 2.0을 지원하고 있다. 88 | ``` 89 | GET /oap/wb/v2/oauth/tokencheck HTTP/1.1 90 | … 91 | Content-Type: Applicatin/x-www-form-urlencoded 92 | appKey: 93 | Authorization: Bearer 94 | hashVAL: 95 | … 96 | ``` 97 | 98 | ##### 3.5 Response 데이터의 형태 99 | JSON Format인 경우 다음과 같다 JSON tag의 순서는 연동규격에 작성된 순서와 다를 수 있다. 100 | ``` 101 | { 102 | “dataHeader”: { 103 | … 104 | }, 105 | “dataBody”: { 106 | … 107 | }, 108 | } 109 | ``` 110 | 111 | -------------------------------------------------------------------------------- /auth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalwooribank/API_User_Auth/c25aa9a894d9fe337f2ab43f5de8fcb1893a7a2c/auth.png -------------------------------------------------------------------------------- /doc/우리은행_오픈API_사용자인증_API명세서_v1.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/digitalwooribank/API_User_Auth/c25aa9a894d9fe337f2ab43f5de8fcb1893a7a2c/doc/우리은행_오픈API_사용자인증_API명세서_v1.0.pdf -------------------------------------------------------------------------------- /swagger/휴대폰인증발송_getCellCerti.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger" : "2.0", 3 | "info" : { 4 | "description" : "Wooribank API, Wooribank Swagger Spec. JSON", 5 | "version" : "1.0.0", 6 | "title" : "Wooribank API" 7 | }, 8 | "host" : "localhost:8080", 9 | "basePath" : "/", 10 | "tags" : [ { 11 | "name" : "List of APIs", 12 | "description" : "" 13 | } ], 14 | "paths" : { 15 | "/oai/wb/v1/login/getCellCerti" : { 16 | "post" : { 17 | "tags" : [ "List of APIs" ], 18 | "summary" : "휴대폰인증발송", 19 | "operationId" : "_oai_wb_v1_login_getCellCerti", 20 | "consumes" : [ "application/json" ], 21 | "produces" : [ "application/json" ], 22 | "parameters" : [ { 23 | "name" : "appkey", 24 | "in" : "header", 25 | "description" : "API Key(제휴사키)", 26 | "type" : "string", 27 | "required" : false 28 | }, { 29 | "in" : "body", 30 | "name" : "REQUEST", 31 | "description" : "request body", 32 | "required" : true, 33 | "schema" : { 34 | "$ref" : "#/definitions/_oai_wb_v1_login_getCellCerti_REQUEST_to7dhpyc3587" 35 | } 36 | } ], 37 | "responses" : { 38 | "400" : { 39 | "description" : "BAD_REQUEST" 40 | }, 41 | "404" : { 42 | "description" : "NOT_FOUND" 43 | }, 44 | "405" : { 45 | "description" : "METHOD_NOT_ALLOWED" 46 | }, 47 | "500" : { 48 | "description" : "INTERNAL_SERVER_ERROR" 49 | }, 50 | "503" : { 51 | "description" : "SERVICE_UNAVAILABLE" 52 | }, 53 | "200" : { 54 | "description" : "OK", 55 | "schema" : { 56 | "$ref" : "#/definitions/_oai_wb_v1_login_getCellCerti_RESPONSE_1h82kvk1sfneg" 57 | } 58 | } 59 | } 60 | } 61 | } 62 | }, 63 | "definitions" : { 64 | "_oai_wb_v1_login_getCellCerti_REQUEST_to7dhpyc3587" : { 65 | "type" : "object", 66 | "required" : [ "dataBody", "dataHeader" ], 67 | "properties" : { 68 | "dataHeader" : { 69 | "description" : "response data header", 70 | "$ref" : "#/definitions/_oai_wb_v1_login_getCellCerti_dataHeader_ubgc8pyzma1v" 71 | }, 72 | "dataBody" : { 73 | "description" : "response data header", 74 | "$ref" : "#/definitions/_oai_wb_v1_login_getCellCerti_dataBody_t87corb9nmsz" 75 | } 76 | } 77 | }, 78 | "_oai_wb_v1_login_getCellCerti_dataHeader_ubgc8pyzma1v" : { 79 | "type" : "object", 80 | "properties" : { 81 | "UTZPE_CNCT_IPAD" : { 82 | "type" : "string", 83 | "example" : "", 84 | "description" : "이용자접속IP주소" 85 | }, 86 | "UTZPE_CNCT_MCHR_UNQ_ID" : { 87 | "type" : "string", 88 | "example" : "", 89 | "description" : "이용자접속기기고유ID" 90 | }, 91 | "UTZPE_CNCT_TEL_NO_TXT" : { 92 | "type" : "string", 93 | "example" : "", 94 | "description" : "이용자접속전화번호" 95 | }, 96 | "UTZPE_CNCT_MCHR_IDF_SRNO" : { 97 | "type" : "string", 98 | "example" : "", 99 | "description" : "이용자접속기기식별일련번호" 100 | }, 101 | "UTZ_MCHR_OS_DSCD" : { 102 | "type" : "string", 103 | "example" : "", 104 | "description" : "이용기기운영체계구분코드" 105 | }, 106 | "UTZ_MCHR_OS_VER_NM" : { 107 | "type" : "string", 108 | "example" : "", 109 | "description" : "이용기기운영체계버전명" 110 | }, 111 | "UTZ_MCHR_MDL_NM" : { 112 | "type" : "string", 113 | "example" : "", 114 | "description" : "이용기기모델명" 115 | }, 116 | "UTZ_MCHR_APP_VER_NM" : { 117 | "type" : "string", 118 | "example" : "", 119 | "description" : "앱 버전" 120 | } 121 | }, 122 | "description" : "response data header" 123 | }, 124 | "_oai_wb_v1_login_getCellCerti_dataBody_t87corb9nmsz" : { 125 | "type" : "object", 126 | "required" : [ "COMC_DIS", "ENCY_RRNO_LSNM", "FNM", "HP_CRTF_AGR_YN", "HP_NO", "RRNO_BFNB" ], 127 | "properties" : { 128 | "COMC_DIS" : { 129 | "type" : "string", 130 | "example" : "1", 131 | "description" : "통신사구분" 132 | }, 133 | "HP_NO" : { 134 | "type" : "string", 135 | "example" : "01012345678", 136 | "description" : "핸드폰번호" 137 | }, 138 | "HP_CRTF_AGR_YN" : { 139 | "type" : "string", 140 | "example" : "Y", 141 | "description" : "핸드폰인증약관동의여부" 142 | }, 143 | "FNM" : { 144 | "type" : "string", 145 | "example" : "홍길동", 146 | "description" : "성명" 147 | }, 148 | "RRNO_BFNB" : { 149 | "type" : "string", 150 | "example" : "930216", 151 | "description" : "주민번호앞6자리" 152 | }, 153 | "ENCY_RRNO_LSNM" : { 154 | "type" : "string", 155 | "example" : "1234567", 156 | "description" : "주민번호뒤7자리" 157 | } 158 | }, 159 | "description" : "response data header" 160 | }, 161 | "_oai_wb_v1_login_getCellCerti_RESPONSE_1h82kvk1sfneg" : { 162 | "type" : "object", 163 | "required" : [ "dataBody", "dataHeader" ], 164 | "properties" : { 165 | "dataHeader" : { 166 | "description" : "response data header", 167 | "$ref" : "#/definitions/_oai_wb_v1_login_getCellCerti_dataHeader_veyo00a8gi91" 168 | }, 169 | "dataBody" : { 170 | "description" : "response data header", 171 | "$ref" : "#/definitions/_oai_wb_v1_login_getCellCerti_dataBody_qefgd1uexjy1" 172 | } 173 | } 174 | }, 175 | "_oai_wb_v1_login_getCellCerti_dataHeader_veyo00a8gi91" : { 176 | "type" : "object", 177 | "description" : "response data header" 178 | }, 179 | "_oai_wb_v1_login_getCellCerti_dataBody_qefgd1uexjy1" : { 180 | "type" : "object", 181 | "required" : [ "CRTF_UNQ_NO" ], 182 | "properties" : { 183 | "CRTF_UNQ_NO" : { 184 | "type" : "string", 185 | "example" : "MG12345678901234567890", 186 | "description" : "인증고유번호" 187 | }, 188 | "VCNT" : { 189 | "type" : "string", 190 | "example" : "", 191 | "description" : "공란" 192 | } 193 | }, 194 | "description" : "response data header" 195 | } 196 | } 197 | } 198 | -------------------------------------------------------------------------------- /swagger/휴대폰인증번호확인_executeCellCerti.json: -------------------------------------------------------------------------------- 1 | { 2 | "swagger" : "2.0", 3 | "info" : { 4 | "description" : "Wooribank API, Wooribank Swagger Spec. JSON", 5 | "version" : "1.0.0", 6 | "title" : "Wooribank API" 7 | }, 8 | "host" : "localhost:8080", 9 | "basePath" : "/", 10 | "tags" : [ { 11 | "name" : "List of APIs", 12 | "description" : "" 13 | } ], 14 | "paths" : { 15 | "/oai/wb/v1/login/executeCellCerti" : { 16 | "post" : { 17 | "tags" : [ "List of APIs" ], 18 | "summary" : "휴대폰인증번호확인", 19 | "operationId" : "_oai_wb_v1_login_executeCellCerti", 20 | "consumes" : [ "application/json" ], 21 | "produces" : [ "application/json" ], 22 | "parameters" : [ { 23 | "name" : "appkey", 24 | "in" : "header", 25 | "description" : "API Key(제휴사키)", 26 | "type" : "string", 27 | "required" : false 28 | }, { 29 | "in" : "body", 30 | "name" : "REQUEST", 31 | "description" : "request body", 32 | "required" : true, 33 | "schema" : { 34 | "$ref" : "#/definitions/_oai_wb_v1_login_executeCellCerti_REQUEST_1jekzwg8x3j38" 35 | } 36 | } ], 37 | "responses" : { 38 | "400" : { 39 | "description" : "BAD_REQUEST" 40 | }, 41 | "404" : { 42 | "description" : "NOT_FOUND" 43 | }, 44 | "405" : { 45 | "description" : "METHOD_NOT_ALLOWED" 46 | }, 47 | "500" : { 48 | "description" : "INTERNAL_SERVER_ERROR" 49 | }, 50 | "503" : { 51 | "description" : "SERVICE_UNAVAILABLE" 52 | }, 53 | "200" : { 54 | "description" : "OK", 55 | "schema" : { 56 | "$ref" : "#/definitions/_oai_wb_v1_login_executeCellCerti_RESPONSE_1jxzy3qg3gf91" 57 | } 58 | } 59 | } 60 | } 61 | } 62 | }, 63 | 64 | "definitions" : { 65 | 66 | "_oai_wb_v1_login_executeCellCerti_REQUEST_1jekzwg8x3j38" : { 67 | "type" : "object", 68 | "required" : [ "dataBody", "dataHeader" ], 69 | "properties" : { 70 | "dataHeader" : { 71 | "description" : "response data header", 72 | "$ref" : "#/definitions/_oai_wb_v1_login_executeCellCerti_dataHeader_t89o331gdfsn" 73 | }, 74 | "dataBody" : { 75 | "description" : "response data header", 76 | "$ref" : "#/definitions/_oai_wb_v1_login_executeCellCerti_dataBody_1jyda9s9s85yq" 77 | } 78 | } 79 | }, 80 | "_oai_wb_v1_login_executeCellCerti_dataHeader_t89o331gdfsn" : { 81 | "type" : "object", 82 | "properties" : { 83 | "UTZPE_CNCT_IPAD" : { 84 | "type" : "string", 85 | "example" : "", 86 | "description" : "이용자접속IP주소" 87 | }, 88 | "UTZPE_CNCT_MCHR_UNQ_ID" : { 89 | "type" : "string", 90 | "example" : "", 91 | "description" : "이용자접속기기고유ID" 92 | }, 93 | "UTZPE_CNCT_TEL_NO_TXT" : { 94 | "type" : "string", 95 | "example" : "", 96 | "description" : "이용자접속전화번호" 97 | }, 98 | "UTZPE_CNCT_MCHR_IDF_SRNO" : { 99 | "type" : "string", 100 | "example" : "", 101 | "description" : "이용자접속기기식별일련번호" 102 | }, 103 | "UTZ_MCHR_OS_DSCD" : { 104 | "type" : "string", 105 | "example" : "", 106 | "description" : "이용기기운영체계구분코드" 107 | }, 108 | "UTZ_MCHR_OS_VER_NM" : { 109 | "type" : "string", 110 | "example" : "", 111 | "description" : "이용기기운영체계버전명" 112 | }, 113 | "UTZ_MCHR_MDL_NM" : { 114 | "type" : "string", 115 | "example" : "", 116 | "description" : "이용기기모델명" 117 | }, 118 | "UTZ_MCHR_APP_VER_NM" : { 119 | "type" : "string", 120 | "example" : "", 121 | "description" : "앱 버전" 122 | } 123 | }, 124 | "description" : "response data header" 125 | }, 126 | "_oai_wb_v1_login_executeCellCerti_dataBody_1jyda9s9s85yq" : { 127 | "type" : "object", 128 | "required" : [ "CRTF_UNQ_NO", "ENCY_RRNO_LSNM", "ENCY_SMS_CRTF_NO", "RRNO_BFNB" ], 129 | "properties" : { 130 | "RRNO_BFNB" : { 131 | "type" : "string", 132 | "example" : "930216", 133 | "description" : "주민번호앞자리" 134 | }, 135 | "ENCY_RRNO_LSNM" : { 136 | "type" : "string", 137 | "example" : "1234567", 138 | "description" : "암호화주민번호뒷자리" 139 | }, 140 | "ENCY_SMS_CRTF_NO" : { 141 | "type" : "string", 142 | "example" : "1111111", 143 | "description" : "암호화SMS인증번호" 144 | }, 145 | "CRTF_UNQ_NO" : { 146 | "type" : "string", 147 | "example" : "MG12345678901234567890", 148 | "description" : "인증고유번호" 149 | } 150 | }, 151 | "description" : "response data header" 152 | }, 153 | "_oai_wb_v1_login_executeCellCerti_RESPONSE_1jxzy3qg3gf91" : { 154 | "type" : "object", 155 | "required" : [ "dataBody", "dataHeader" ], 156 | "properties" : { 157 | "dataHeader" : { 158 | "description" : "response data header", 159 | "$ref" : "#/definitions/_oai_wb_v1_login_executeCellCerti_dataHeader_1iyhps3k3ws34" 160 | }, 161 | "dataBody" : { 162 | "description" : "response data header", 163 | "$ref" : "#/definitions/_oai_wb_v1_login_executeCellCerti_dataBody_vbpof7na4gtw" 164 | } 165 | } 166 | }, 167 | "_oai_wb_v1_login_executeCellCerti_dataHeader_1iyhps3k3ws34" : { 168 | "type" : "object", 169 | "description" : "response data header" 170 | }, 171 | "_oai_wb_v1_login_executeCellCerti_dataBody_vbpof7na4gtw" : { 172 | "type" : "object", 173 | "properties" : { 174 | "CNT" : { 175 | "type" : "number", 176 | "example" : "1", 177 | "description" : "건수" 178 | }, 179 | "REPT_FA" : { 180 | "description" : "반복부", 181 | "$ref" : "#/definitions/_oai_wb_v1_login_executeCellCerti_REPT_FA_1iyf0q7njqcs8" 182 | } 183 | }, 184 | "description" : "response data header" 185 | }, 186 | "_oai_wb_v1_login_executeCellCerti_REPT_FA_1iyf0q7njqcs8" : { 187 | "type" : "array", 188 | "description" : "반복부", 189 | "items" : { 190 | "description" : "반복부", 191 | "$ref" : "#/definitions/_oai_wb_v1_login_executeCellCerti_REPT_FA_1iv1jsy8ms8xh" 192 | } 193 | }, 194 | "_oai_wb_v1_login_executeCellCerti_REPT_FA_1iv1jsy8ms8xh" : { 195 | "type" : "object", 196 | "required" : [ "CUS_USG_ACNO" ], 197 | "properties" : { 198 | "CUS_USG_ACNO" : { 199 | "type" : "string", 200 | "example" : "1002456******", 201 | "description" : "고객사용계좌번호" 202 | } 203 | }, 204 | "description" : "반복부" 205 | } 206 | } 207 | } 208 | --------------------------------------------------------------------------------