commonMain.aws.sdk.kotlin.services.ssooidc.auth.DefaultSsoOidcAuthSchemeProvider.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ssooidc-jvm Show documentation
Show all versions of ssooidc-jvm Show documentation
The AWS SDK for Kotlin client for SSO OIDC
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssooidc.auth
import aws.sdk.kotlin.services.ssooidc.endpoints.SsoOidcEndpointProvider
import aws.smithy.kotlin.runtime.auth.AuthOption
import aws.smithy.kotlin.runtime.auth.AuthSchemeId
import aws.smithy.kotlin.runtime.http.auth.sigV4
public class DefaultSsoOidcAuthSchemeProvider(private val endpointProvider: SsoOidcEndpointProvider? = null) : SsoOidcAuthSchemeProvider {
private val operationOverrides = mapOf>(
"CreateToken" to listOf(
AuthOption(AuthSchemeId.Anonymous),
),
"RegisterClient" to listOf(
AuthOption(AuthSchemeId.Anonymous),
),
"StartDeviceAuthorization" to listOf(
AuthOption(AuthSchemeId.Anonymous),
),
)
private val serviceDefaults = listOf(
sigV4(),
)
override suspend fun resolveAuthScheme(params: SsoOidcAuthSchemeParameters): List {
val modeledAuthOptions = operationOverrides.getOrElse(params.operationName) {
serviceDefaults
}
return modeledAuthOptions
}
}