func (p *awsIdentityProvider) WithLogger(l shared.Logger) *awsIdentityProvider {
	if l != nil {
		p.logger = l
	}
	return p
}
WithLogger is a fluent method used or setting the logger implementation for the identity provider.
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
}
func NewAwsIdentityProvider(cfg aws.Config) *awsIdentityProvider {
	return &awsIdentityProvider{
		stsClient: sts.NewFromConfig(cfg),
		iamClient: iam.NewFromConfig(cfg),
		logger:    new(shared.DefaultLogger),
		wg:        new(sync.WaitGroup),
	}
}