Rename OIDC components and variables to OAuth (#6686)
* Rename `OIDC` components and variables to `OAuth`. This matches the new behavior in the SDK.
This commit is contained in:
parent
7dd81dc838
commit
367995303d
96 changed files with 479 additions and 482 deletions
|
|
@ -24,8 +24,8 @@ data class SessionData(
|
|||
val refreshToken: String?,
|
||||
/** The homeserver URL of the session. */
|
||||
val homeserverUrl: String,
|
||||
/** The Open ID Connect info for this session, if any. */
|
||||
val oidcData: String?,
|
||||
/** The Open Authorization info for this session, if any. */
|
||||
val oAuthData: String?,
|
||||
/** The timestamp of the last login. May be `null` in very old sessions. */
|
||||
val loginTimestamp: Date?,
|
||||
/** Whether the [accessToken] is valid or not. */
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ internal fun SessionData.toDbModel(): DbSessionData {
|
|||
accessToken = accessToken,
|
||||
refreshToken = refreshToken,
|
||||
homeserverUrl = homeserverUrl,
|
||||
oidcData = oidcData,
|
||||
oidcData = oAuthData,
|
||||
loginTimestamp = loginTimestamp?.time,
|
||||
isTokenValid = if (isTokenValid) 1L else 0L,
|
||||
loginType = loginType.name,
|
||||
|
|
@ -41,7 +41,7 @@ internal fun DbSessionData.toApiModel(): SessionData {
|
|||
accessToken = accessToken,
|
||||
refreshToken = refreshToken,
|
||||
homeserverUrl = homeserverUrl,
|
||||
oidcData = oidcData,
|
||||
oAuthData = oidcData,
|
||||
loginTimestamp = loginTimestamp?.let { Date(it) },
|
||||
isTokenValid = isTokenValid == 1L,
|
||||
loginType = LoginType.fromName(loginType ?: LoginType.UNKNOWN.name),
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ fun aSessionData(
|
|||
accessToken = accessToken,
|
||||
refreshToken = refreshToken,
|
||||
homeserverUrl = "aHomeserverUrl",
|
||||
oidcData = null,
|
||||
oAuthData = null,
|
||||
loginTimestamp = null,
|
||||
isTokenValid = isTokenValid,
|
||||
loginType = LoginType.UNKNOWN,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue