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

commonMain.aws.smithy.kotlin.runtime.auth.AuthOption.kt Maven / Gradle / Ivy

There is a newer version: 1.3.31
Show newest version
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0
 */

package aws.smithy.kotlin.runtime.auth

import aws.smithy.kotlin.runtime.collections.Attributes
import aws.smithy.kotlin.runtime.collections.emptyAttributes

/**
 * A tuple of [AuthSchemeId] and typed properties. AuthSchemeOption represents a candidate
 * authentication scheme.
 */
public interface AuthOption {
    /**
     * The ID of the authentication scheme
     */
    public val schemeId: AuthSchemeId

    /**
     * Identity or signer attributes to use with this resolved authentication scheme
     */
    public val attributes: Attributes
}

public fun AuthOption(id: AuthSchemeId, attributes: Attributes = emptyAttributes()): AuthOption =
    AuthOptionImpl(id, attributes)

private data class AuthOptionImpl(
    override val schemeId: AuthSchemeId,
    override val attributes: Attributes,
) : AuthOption




© 2015 - 2024 Weber Informatics LLC | Privacy Policy