iOS) Moya ์์ Plugin ์ผ๋ก Token ๊ฐฑ์ ํ๊ธฐ
๋ด์ฉ Custom Moya Plugin ์ ํ์ฉํด์ Refresh Token ์ผ๋ก Access Token ๊ฐฑ์ ํ๊ธฐ ์๋ฒํต์ ๊ณผ์ 1๏ธโฃ ๋ชจ๋ ์๋ฒํต์ + ์ก์ธ์ค ํ ํฐ 2๏ธโฃ ์ก์ธ์ค ํ ํฐ ๋ง๋ฃ o (40x status code) 3๏ธโฃ didReceive ์์ ์๋ฒํต์ (์ก์ธ์ค ํ ํฐ + ๋ฆฌํ๋ ์ฌ ํ ํฐ) ๋ฐ๋์ ๋ด์ ๋ณด๋ด๊ธฐ -> 3-1 ๋ฆฌํ๋ ์ฌ ํ ํฐ ๋ง๋ฃ x (200 status code) -> ์ก์ธ์ค ํ ํฐ, ๋ฆฌํ๋ ์ฌ ํ ํฐ ๊ฐฑ์ -> 3-2 ๋ฆฌํ๋ ์ฌ ํ ํฐ ๋ง๋ฃ o (40x status code) 4๏ธโฃ ๋ฆฌํ๋ ์ฌ ํ ํฐ, ์ก์ธ์คํ ํฐ ์ญ์ ๋ฐ ๋ก๊ทธ์ธ ํ๋ฉด์ผ๋ก ๋ณด๋ด๊ธฐ ๐ก Plugin ์ปค์คํ ํด์ ํด๊ฒฐํ๊ธฐ Plugins Moya plugins are used to modify requests and responses ..
iOS/Open Library
2022. 4. 11. 10:38
TAG
- SwiftUI
- Algorithm
- IOS
- Swift
- projectsetting
- rxswift
- OpenSourceLibrary
- Objective-C
- APNS
- RxCocoa
- WWDC22
- WWDC
- async/await
- github
- Firebase
- Widget
- ์๋ฒํต์
- MOYA
- 2022 KAKAO TECH INTERNSHIP
- CloneCoding
- UserDefaults
- WidgetKit
- urlsession
- Protocol
- watchOS
- Notification
- MVVM
- configurable widget
- YPImagePicker
- containerBackground
์ต๊ทผ์ ์ฌ๋ผ์จ ๊ธ
์ต๊ทผ์ ๋ฌ๋ฆฐ ๋๊ธ
๊ธ ๋ณด๊ดํจ
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
๋งํฌ
- Total
- Today
- Yesterday