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

main.dev.neeffect.nee.security.oauth.config.OauthModule.kt Maven / Gradle / Ivy

The newest version!
package dev.neeffect.nee.security.oauth.config

import dev.neeffect.nee.security.UserRole
import dev.neeffect.nee.security.jwt.JwtConfig
import dev.neeffect.nee.security.oauth.OauthConfig
import dev.neeffect.nee.security.oauth.OauthProviderName
import dev.neeffect.nee.security.oauth.OauthResponse
import dev.neeffect.nee.security.oauth.OauthService
import dev.neeffect.nee.security.oauth.SimpleOauthConfigModule
import io.vavr.collection.Seq

class OauthModule(
    oathConfig: OauthConfig,
    jwtConfig: JwtConfig,
    private val rolesMapper: RolesMapper
) : SimpleOauthConfigModule(oathConfig, jwtConfig) {

    val oauthService by lazy {
        OauthService(this)
    }

    override val userRoles: (OauthProviderName, OauthResponse) -> Seq = rolesMapper
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy