// SetAuthenticationToken sets the AuthenticationToken field's value.
769841
func (s *GetCurrentUserInput) SetAuthenticationToken(v string) *GetCurrentUserInput {
	s.AuthenticationToken = &v
	return s
}
469236
func (a *Webhook) SetAuthenticationInfoResolverWrapper(wrapper webhook.AuthenticationInfoResolverWrapper) {
	a.clientManager.SetAuthenticationInfoResolverWrapper(wrapper)
}
1220170
func (s *User) SetAuthenticationType(v string) *User {
	s.AuthenticationType = &v
	return s
}
33374
func (s *RespondToAuthChallengeOutput) SetAuthenticationResult(v *AuthenticationResultType) *RespondToAuthChallengeOutput {
	s.AuthenticationResult = v
	return s
}
1192633
func (s *GetDocumentPathInput) SetAuthenticationToken(v string) *GetDocumentPathInput {
	s.AuthenticationToken = &v
	return s
}
1276070
func (s *CreateReplicationGroupInput) SetAuthToken(v string) *CreateReplicationGroupInput {
	s.AuthToken = &v
	return s
}
951105
func (s *ResolveCustomerInput) SetRegistrationToken(v string) *ResolveCustomerInput {
	s.RegistrationToken = &v
	return s
}
495
func (s *CreateUserInput) SetAuthenticationToken(v string) *CreateUserInput {
	s.AuthenticationToken = &v
	return s
}
216581
func (s *TestInvokeAuthorizerInput) SetTokenSignature(v string) *TestInvokeAuthorizerInput {
	s.TokenSignature = &v
	return s
}
605111
func (tp *jwtOAuthTokenProvider) SetAuthenticationValues(
	t *adal.ServicePrincipalToken, v *url.Values) error {
	v.Set("client_assertion", tp.clientJWT)
	v.Set("client_assertion_type", "urn:ietf:params:oauth:client-assertion-type:jwt-bearer")
	return nil
}
1169110
func (s *DescribeDocumentVersionsInput) SetAuthenticationToken(v string) *DescribeDocumentVersionsInput {
	s.AuthenticationToken = &v
	return s
}
401668
func (s *AuthorizationData) SetAuthorizationToken(v string) *AuthorizationData {
	s.AuthorizationToken = &v
	return s
}
752622
func (s *EnableMFADeviceInput) SetAuthenticationCode1(v string) *EnableMFADeviceInput {
	s.AuthenticationCode1 = &v
	return s
}
327171
func (msiSecret *ServicePrincipalMSISecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error {
	return nil
}
1183695
func (s *DescribeUserStackAssociationsInput) SetAuthenticationType(v string) *DescribeUserStackAssociationsInput {
	s.AuthenticationType = &v
	return s
}
867784
func (s *UpdateDocumentInput) SetAuthenticationToken(v string) *UpdateDocumentInput {
	s.AuthenticationToken = &v
	return s
}
202497
func (c *vstConnection) SetAuthentication(auth driver.Authentication) (driver.Connection, error) {
	var vstAuth vstAuthentication
	switch auth.Type() {
	case driver.AuthenticationTypeBasic:
		userName := auth.Get("username")
		password := auth.Get("password")
		vstAuth = newBasicAuthentication(userName, password)
	case driver.AuthenticationTypeJWT:
		userName := auth.Get("username")
		password := auth.Get("password")
		vstAuth = newJWTAuthentication(userName, password)
	default:
		return nil, driver.WithStack(fmt.Errorf("Unsupported authentication type %d", int(auth.Type())))
	}

	// Set authentication callback
	c.transport.SetOnConnectionCreated(vstAuth.PrepareFunc(c))
	// Close all existing connections
	c.transport.CloseAllConnections()

	return c, nil
}