software.amazon.awssdk.identity.spi.internal.DefaultIdentityProviders 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.internal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import software.amazon.awssdk.annotations.Immutable;
import software.amazon.awssdk.annotations.SdkInternalApi;
import software.amazon.awssdk.identity.spi.Identity;
import software.amazon.awssdk.identity.spi.IdentityProvider;
import software.amazon.awssdk.identity.spi.IdentityProviders;
import software.amazon.awssdk.utils.Lazy;
import software.amazon.awssdk.utils.ToString;
import software.amazon.awssdk.utils.Validate;
/**
* A default implementation of {@link IdentityProviders}. This implementation holds a map of {@link IdentityProvider}s and
* retrieves from the collection based on identity type.
*/
@Immutable
@SdkInternalApi
public final class DefaultIdentityProviders implements IdentityProviders {
/**
* TODO(sra-identity-auth): Currently, some customers assume we won't interact with the identity providers when we create
* the client. This isn't true - we need to call identityType. To TEMPORARILY work around those customer's tests failing,
* this is marked lazy. Once we fully migrate over to the SRA as the default code path, we should remove this lazy and
* ticket everyone in live who is making those bad assumptions.
*/
private final Lazy