Skip to content

Commit fcf4ec1

Browse files
committed
Use UserDefaultsVanMoofTokenStore as default store
1 parent 6d2a261 commit fcf4ec1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ let vanMoof = VanMoof(
126126
// - UbiquitousVanMoofTokenStore (iCloud Key-Value Store)
127127
// - UserDefaultsVanMoofTokenStore
128128
// - InMemoryVanMoofTokenStore
129-
tokenStore: KeychainVanMoofTokenStore()
129+
tokenStore: UserDefaultsVanMoofTokenStore()
130130
)
131131
```
132132

133-
> In default the `KeychainVanMoofTokenStore` will be used to store the `VanMoof.Token`.
133+
> In default the `UserDefaultsVanMoofTokenStore` will be used to store the `VanMoof.Token`.
134134
135135
After the login has succeeded you can retrieve the user profile and the associated bikes.
136136

Sources/VanMoof.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ public final class VanMoof: ObservableObject {
3333
/// - Parameters:
3434
/// - apiURL: The VanMoof API URL. Default value `"https://my.vanmoof.com/api/v8"`
3535
/// - apiKey: The VanMoof API Key. Default value `fcb38d47-f14b-30cf-843b-26283f6a5819`
36-
/// - tokenStore: The VanMoofTokenStore. Default value `KeychainVanMoofTokenStore()`
36+
/// - tokenStore: The VanMoofTokenStore. Default value `UserDefaultsVanMoofTokenStore()`
3737
/// - urlSession: The URLSession. Default value `.shared`
3838
/// - decoder: The JSONDecoder. Default value `.init()`
3939
public init(
4040
apiURL: URL = .init(string: "https://my.vanmoof.com/api/v8")!,
4141
apiKey: String = "fcb38d47-f14b-30cf-843b-26283f6a5819",
42-
tokenStore: VanMoofTokenStore = KeychainVanMoofTokenStore(),
42+
tokenStore: VanMoofTokenStore = UserDefaultsVanMoofTokenStore(),
4343
urlSession: URLSession = .shared,
4444
decoder: JSONDecoder = .init()
4545
) {

0 commit comments

Comments
 (0)