class BasicAuth
| Language | Type name | 
|---|---|
  .NET | Amazon.CDK.AWS.Amplify.Alpha.BasicAuth | 
  Go | github.com/aws/aws-cdk-go/awscdkamplifyalpha/v2#BasicAuth | 
  Java | software.amazon.awscdk.services.amplify.alpha.BasicAuth | 
  Python | aws_cdk.aws_amplify_alpha.BasicAuth | 
  TypeScript (source) | @aws-cdk/aws-amplify-alpha ยป BasicAuth | 
Basic Auth configuration.
Example
const amplifyApp = new amplify.App(this, 'MyApp', {
  sourceCodeProvider: new amplify.GitHubSourceCodeProvider({
    owner: '<user>',
    repository: '<repo>',
    oauthToken: SecretValue.secretsManager('my-github-token'),
  }),
  basicAuth: amplify.BasicAuth.fromGeneratedPassword('username'),
});
Initializer
new BasicAuth(props: BasicAuthProps)
Parameters
- props 
BasicAuth Props  
Methods
| Name | Description | 
|---|---|
| bind(scope, id) | Binds this Basic Auth configuration to an App. | 
| static from | Creates a Basic Auth configuration from a username and a password. | 
| static from | Creates a Basic Auth configuration with a password generated in Secrets Manager. | 
bind(scope, id)
public bind(scope: Construct, id: string): BasicAuthConfig
Parameters
- scope 
Construct - id 
string 
Returns
Binds this Basic Auth configuration to an App.
static fromCredentials(username, password) 
public static fromCredentials(username: string, password: SecretValue): BasicAuth
Parameters
- username 
stringโ The username. - password 
Secretโ The password.Value  
Returns
Creates a Basic Auth configuration from a username and a password.
static fromGeneratedPassword(username, encryptionKey?)  
public static fromGeneratedPassword(username: string, encryptionKey?: IKey): BasicAuth
Parameters
- username 
stringโ The username. - encryptionKey 
IKeyโ The encryption key to use to encrypt the password in Secrets Manager. 
Returns
Creates a Basic Auth configuration with a password generated in Secrets Manager.

 .NET
 Go
 Java
 Python
 TypeScript (