Skip to content

Commit

Permalink
TF-2871 Convert milliseconds to date for expire time
Browse files Browse the repository at this point in the history
  • Loading branch information
dab246 committed Jun 4, 2024
1 parent a5889f4 commit bf3c2a7
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,23 @@ class AuthenticationInterceptor: RequestInterceptor {
}

let newRefreshToken = tokenResponse.refreshToken ?? authenticationSSO.refreshToken
let expireTime = tokenResponse.expiresTime != nil
? tokenResponse.expiresTime!.convertMillisecondsToISO8601String()
: nil

self.authentication = AuthenticationSSO(
type: AuthenticationType.oidc,
accessToken: accessToken,
refreshToken: newRefreshToken,
expireTime: "\(tokenResponse.expiresTime ?? 0)"
expireTime: expireTime
)

self.keychainController.updateTokenOidc(
accountId: self.accountId,
newTokenOidc: TokenOidc(
token: accessToken,
tokenId: tokenResponse.tokenId,
expiredTime: "\(tokenResponse.expiresTime ?? 0)",
expiredTime: expireTime,
refreshToken: newRefreshToken
)
)
Expand Down

0 comments on commit bf3c2a7

Please sign in to comment.