Documentation ¶
Index ¶
Constants ¶
View Source
const ( DummyAccessToken = "" /* 4800-byte string literal not displayed */ DummyIDToken = "" /* 1139-byte string literal not displayed */ )
Variables ¶
View Source
var ( TestTokenIssued = time.Now() TestTokenExpiry = time.Now().Add(3599 * time.Second) )
View Source
var ( AuxiliaryTenantIds = strings.Split(os.Getenv("ARM_AUXILIARY_TENANT_IDS"), ";") ClientCertPassword = os.Getenv("ARM_CLIENT_CERTIFICATE_PASSWORD") ClientCertificate = os.Getenv("ARM_CLIENT_CERTIFICATE") ClientCertificatePath = os.Getenv("ARM_CLIENT_CERTIFICATE_PATH") ClientId = os.Getenv("ARM_CLIENT_ID") ClientSecret = os.Getenv("ARM_CLIENT_SECRET") CustomManagedIdentityEndpoint = os.Getenv("ARM_MSI_ENDPOINT") Environment = envDefault("ARM_ENVIRONMENT", "global") GitHubToken = os.Getenv("ACTIONS_ID_TOKEN_REQUEST_TOKEN") GitHubTokenURL = os.Getenv("ACTIONS_ID_TOKEN_REQUEST_URL") IdToken = os.Getenv("ARM_OIDC_TOKEN") SubscriptionId = os.Getenv("ARM_SUBSCRIPTION_ID") TenantId = os.Getenv("ARM_TENANT_ID") )
Functions ¶
Types ¶
type AzureADAccessTokenMockClient ¶
type AzureADAccessTokenMockClient struct {
Authorization environments.Authorization
}
type Connection ¶
type Connection struct { AuthConfig auth.Credentials Authorizer auth.Authorizer Claims *claims.Claims }
func NewConnection ¶
func NewConnection(t *testing.T) *Connection
NewConnection configures and returns a Connection for use in tests.
func (*Connection) Authorize ¶
func (c *Connection) Authorize(ctx context.Context, t *testing.T, api environments.Api)
Authorize configures an Authorizer for the Connection
type TestAuthorizer ¶
type TestAuthorizer struct{}
func (*TestAuthorizer) AuxiliaryTokens ¶
func (*TestAuthorizer) ExpireTokens ¶
func (*TestAuthorizer) ExpireTokens() error
Click to show internal directories.
Click to hide internal directories.