software.amazon.awssdk.identity.spi.IdentityProviders Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of identity-spi Show documentation
Show all versions of identity-spi Show documentation
The AWS SDK for Java - Identity SPI module contains the Identity interfaces that are used by other modules in
the library.
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
package software.amazon.awssdk.identity.spi;
import software.amazon.awssdk.annotations.SdkPublicApi;
import software.amazon.awssdk.identity.spi.internal.DefaultIdentityProviders;
import software.amazon.awssdk.utils.builder.CopyableBuilder;
import software.amazon.awssdk.utils.builder.ToCopyableBuilder;
/**
* An interface to allow retrieving an IdentityProvider based on the identity type.
*/
@SdkPublicApi
public interface IdentityProviders extends ToCopyableBuilder {
/**
* Retrieve an identity provider for the provided identity type.
*/
IdentityProvider identityProvider(Class identityType);
/**
* Get a new builder for creating a {@link IdentityProviders}.
*/
static Builder builder() {
return DefaultIdentityProviders.builder();
}
/**
* A builder for a {@link IdentityProviders}.
*/
interface Builder extends CopyableBuilder {
/**
* Add the {@link IdentityProvider} for a given type. If a provider of that type, as determined by {@link
* IdentityProvider#identityType()} is already added, it will be replaced.
*/
Builder putIdentityProvider(IdentityProvider identityProvider);
}
}