File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ extension FernoAPIClient {
123123
124124 if let cachedToken = lock. withLock ( {
125125 if let accessToken = configuration. accessToken,
126- let tokenExpriationDate = configuration. tokenExpriationDate ,
126+ let tokenExpriationDate = configuration. tokenExpirationDate ,
127127 Date ( ) . timeIntervalSince ( tokenExpriationDate) > 30 * 60 { // should be valid for 1 hour
128128 return accessToken
129129 } else {
@@ -151,7 +151,7 @@ extension FernoAPIClient {
151151 let res = try await client. send ( req) . content. decode ( OAuthResponse . self)
152152 lock. withLockVoid {
153153 self . configuration. accessToken = res. access_token
154- self . configuration. tokenExpriationDate = Date ( ) . addingTimeInterval ( TimeInterval ( res. expires_in) )
154+ self . configuration. tokenExpirationDate = Date ( ) . addingTimeInterval ( TimeInterval ( res. expires_in) )
155155 }
156156 self . configuration. logger. debug ( " Access token received " )
157157 return res. access_token
Original file line number Diff line number Diff line change @@ -13,21 +13,21 @@ public struct FernoConfiguration {
1313 public let email : String
1414 public let privateKey : String
1515 public var accessToken : String ?
16- public var tokenExpriationDate : Date ?
16+ public var tokenExpirationDate : Date ?
1717
1818 public init (
1919 basePath: String ,
2020 email: String ,
2121 privateKey: String ,
2222 accessToken: String ? = nil ,
23- tokenExpriationDate : Date ? = nil ,
23+ tokenExpirationDate : Date ? = nil ,
2424 logger: Logger = . init( label: " codes.vapor.ferno " )
2525 ) {
2626 self . basePath = basePath
2727 self . email = email
2828 self . privateKey = privateKey
2929 self . accessToken = accessToken
30- self . tokenExpriationDate = tokenExpriationDate
30+ self . tokenExpirationDate = tokenExpirationDate
3131 self . logger = logger
3232 }
3333}
You can’t perform that action at this time.
0 commit comments