share

suspend fun share(accessMode: AccessMode, localSecret: LocalSecret? = null): ShareToken

Creates a share token to share this repository with other devices.

By default the access mode of the token will be the same as the mode the repo is currently opened in but it can be escalated with the local_secret param or de-escalated with the access_mode param.

  • access_mode: access mode of the token. Useful to de-escalate the access mode to below of what the repo is opened in.

  • local_secret: the local repo secret. If not None, the share token's access mode will be the same as what the secret provides. Useful to escalate the access mode to above of what the repo is opened in.