abstract class TokenManager<ResponseType : BaseResponseType>(@Qualifier(value = "graphglueNeo4jOperations") val neoOperations: ReactiveNeo4jOperations, val syncConfigurationProperties: SyncConfigurationProperties)

Manager for token from login service

Parameters

neoOperations

Reference for the spring instance of ReactiveNeo4jOperations

syncConfigurationProperties

Reference for the spring instance of GropiusGithubConfigurationProperties

Constructors

Link copied to clipboard
constructor(@Qualifier(value = "graphglueNeo4jOperations") neoOperations: ReactiveNeo4jOperations, syncConfigurationProperties: SyncConfigurationProperties)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
private val client: HttpClient

Http Client for Login Service requests

Link copied to clipboard
private val logger: Logger?

Logger used to print notifications

Link copied to clipboard
private val neoOperations: ReactiveNeo4jOperations

Functions

Link copied to clipboard
suspend fun advertiseIMSUser(user: IMSUser)

Advertise to the login service that an IMSUser has been created

Link copied to clipboard
private suspend fun <T> executeUntilWorking(imsProject: IMSProject, users: List<IMSUser>, executor: suspend (token: ResponseType) -> Optional<T>, owner: List<GropiusUser>): Pair<IMSUser, T>
suspend fun <T> executeUntilWorking(imsProject: IMSProject, user: List<User>, owner: List<GropiusUser>, executor: suspend (token: ResponseType) -> Optional<T>): Pair<IMSUser, T>

Attempt a query for a list of users until it works

Link copied to clipboard
private suspend fun getPossibleUsersForUser(ims: IMS, user: User): List<IMSUser>

Collect neighboring users for a given ims and user combo

Link copied to clipboard
suspend fun getTokenForIMSUser(ims: IMS, readUser: String, imsUser: IMSUser?): ResponseType

Load the token of from the login service

Link copied to clipboard
private suspend fun getUserToken(imsUser: IMSUser): ResponseType?

Request an user token from the auth service

Link copied to clipboard
private suspend fun isAllowed(imsProject: IMSProject, user: IMSUser, owner: List<GropiusUser>): Boolean

Check if a user is allowed to be used for syncing

Link copied to clipboard
abstract suspend fun parseHttpBody(response: HttpResponse): ResponseType?

Parse the response of a token query