TF-2871 Convert milliseconds to date for expire time
This commit is contained in:
@@ -41,12 +41,15 @@ class AuthenticationInterceptor: RequestInterceptor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let newRefreshToken = tokenResponse.refreshToken ?? authenticationSSO.refreshToken
|
let newRefreshToken = tokenResponse.refreshToken ?? authenticationSSO.refreshToken
|
||||||
|
let expireTime = tokenResponse.expiresTime != nil
|
||||||
|
? tokenResponse.expiresTime!.convertMillisecondsToISO8601String()
|
||||||
|
: nil
|
||||||
|
|
||||||
self.authentication = AuthenticationSSO(
|
self.authentication = AuthenticationSSO(
|
||||||
type: AuthenticationType.oidc,
|
type: AuthenticationType.oidc,
|
||||||
accessToken: accessToken,
|
accessToken: accessToken,
|
||||||
refreshToken: newRefreshToken,
|
refreshToken: newRefreshToken,
|
||||||
expireTime: "\(tokenResponse.expiresTime ?? 0)"
|
expireTime: expireTime
|
||||||
)
|
)
|
||||||
|
|
||||||
self.keychainController.updateTokenOidc(
|
self.keychainController.updateTokenOidc(
|
||||||
@@ -54,7 +57,7 @@ class AuthenticationInterceptor: RequestInterceptor {
|
|||||||
newTokenOidc: TokenOidc(
|
newTokenOidc: TokenOidc(
|
||||||
token: accessToken,
|
token: accessToken,
|
||||||
tokenId: tokenResponse.tokenId,
|
tokenId: tokenResponse.tokenId,
|
||||||
expiredTime: "\(tokenResponse.expiresTime ?? 0)",
|
expiredTime: expireTime,
|
||||||
refreshToken: newRefreshToken
|
refreshToken: newRefreshToken
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user