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
- MOYA
- IOS
- OpenSourceLibrary
- Firebase
- Protocol
- rxswift
- APNS
- MVVM
- configurable widget
- watchOS
- ์๋ฒํต์
- SwiftUI
- async/await
- Objective-C
- Swift
- CloneCoding
- projectsetting
- github
- Algorithm
- RxCocoa
- UserDefaults
- WWDC22
- WWDC
- WidgetKit
- YPImagePicker
- containerBackground
- 2022 KAKAO TECH INTERNSHIP
- Notification
- urlsession
- Widget
์ต๊ทผ์ ์ฌ๋ผ์จ ๊ธ
์ต๊ทผ์ ๋ฌ๋ฆฐ ๋๊ธ
๊ธ ๋ณด๊ดํจ
์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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