func NewAwsIdentityProvider(cfg aws.Config) *awsIdentityProvider {
	return &awsIdentityProvider{
		stsClient: sts.NewFromConfig(cfg),
		iamClient: iam.NewFromConfig(cfg),
		logger:    new(shared.DefaultLogger),
		wg:        new(sync.WaitGroup),
	}
}
NewAwsIdentityProvider creates a valid, default AwsIdentityProvider using the specified client.ConfigProvider.
package identity
import (
	"context"
	"encoding/json"
	"github.com/aws/aws-sdk-go-v2/aws"
	"github.com/aws/aws-sdk-go-v2/aws/arn"
	"github.com/aws/aws-sdk-go-v2/service/iam"
	"github.com/aws/aws-sdk-go-v2/service/sts"
	"github.com/mmmorris1975/aws-runas/shared"
	"net/url"
	"sort"
	"strings"
	"sync"
)
const ProviderAws = "AwsIdentityProvider"
type awsIdentityProvider struct {
	stsClient StsApi
	iamClient iamApi
	logger    shared.Logger
	wg        *sync.WaitGroup
}