Skip to content

Commit 8f41d14

Browse files
committed
refactor(mps-sync-plugin): pass authProvider through restoreState into syncService
1 parent 35d926b commit 8f41d14

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mps-sync-plugin-lib/src/main/kotlin/org/modelix/mps/sync/persistence/PersistableState.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ data class PersistableState(
105105
*
106106
* @return some context statistics about the restored state
107107
*/
108-
fun restoreState(syncService: IRebindModulesSyncService, project: Project): RestoredStateContext? {
108+
fun restoreState(syncService: IRebindModulesSyncService, project: Project, authProvider: () -> String? = { null }): RestoredStateContext? {
109109
var client: ModelClientV2? = null
110110

111111
try {
@@ -121,7 +121,7 @@ data class PersistableState(
121121

122122
logger.debug { "Restoring connection to model server." }
123123
// TODO FIXME auth token is missing
124-
client = syncService.connectModelServer(clientUrl)
124+
client = syncService.connectModelServer(clientUrl, authProvider)
125125
if (client == null) {
126126
throw IllegalStateException("Connection to $clientUrl failed, thus PersistableState is not restored.")
127127
}

0 commit comments

Comments
 (0)