All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.supertokens.sdk.recipes.thirdparty.providers.GitLab.kt Maven / Gradle / Ivy

The newest version!
package com.supertokens.sdk.recipes.thirdparty.providers

import com.supertokens.sdk.SuperTokensClient
import com.supertokens.sdk.common.ThirdPartyAuth
import com.supertokens.sdk.recipes.thirdparty.Provider
import com.supertokens.sdk.recipes.thirdparty.ProviderBuilder
import com.supertokens.sdk.recipes.thirdparty.ProviderConfig
import com.supertokens.sdk.recipes.thirdparty.ThirdPartyRecipe
import com.supertokens.sdk.recipes.thirdparty.ThirdPartySignInAuthCode
import com.supertokens.sdk.recipes.thirdparty.ThirdPartySignInTokens

class ProviderGitLab(
    superTokens: SuperTokensClient,
    config: ProviderConfig,
) :
    Provider(
        id = ThirdPartyAuth.GITLAB,
        config = config,
    )

object GitLab : ProviderBuilder() {

  const val id = ThirdPartyAuth.GITLAB

  object AuthCode : ThirdPartySignInAuthCode(id)

  object Tokens : ThirdPartySignInTokens(id)

  override fun install(
      configure: ProviderConfig.() -> Unit
  ): (SuperTokensClient, ThirdPartyRecipe) -> ProviderGitLab {
    val config = ProviderConfig().apply(configure)

    return { superTokens, _ ->
      ProviderGitLab(
          superTokens,
          config,
      )
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy