// SetupAuthentication generates a random password for the given machine,
// recording it via the machine's SetPassword method, and updates the
// info arguments with the tag and password.
541142
func SetupAuthentication(
	machine TaggedPasswordChanger,
	stateInfo *mongo.MongoInfo,
	apiInfo *api.Info,
) (*mongo.MongoInfo, *api.Info, error) {
	auth := simpleAuth{stateInfo, apiInfo}
	return auth.SetupAuthentication(machine)
}
1117230
func (noSecret *ServicePrincipalNoSecret) SetAuthenticationValues(spt *ServicePrincipalToken, v *url.Values) error {
	return fmt.Errorf("Manually created ServicePrincipalToken does not contain secret material to retrieve a new access token")
}
916070
func (s *DeleteCustomMetadataInput) SetAuthenticationToken(v string) *DeleteCustomMetadataInput {
	s.AuthenticationToken = &v
	return s
}
769841
func (s *GetCurrentUserInput) SetAuthenticationToken(v string) *GetCurrentUserInput {
	s.AuthenticationToken = &v
	return s
}
714987
func (s *WebhookDefinition) SetAuthenticationConfiguration(v *WebhookAuthConfiguration) *WebhookDefinition {
	s.AuthenticationConfiguration = v
	return s
}
289560
func (s *ChapInfo) SetSecretToAuthenticateInitiator(v string) *ChapInfo {
	s.SecretToAuthenticateInitiator = &v
	return s
}
947523
func (s *DescribeSessionsInput) SetAuthenticationType(v string) *DescribeSessionsInput {
	s.AuthenticationType = &v
	return s
}
495
func (s *CreateUserInput) SetAuthenticationToken(v string) *CreateUserInput {
	s.AuthenticationToken = &v
	return s
}
29682
func (f *Form) SetAuthenticityToken(s string) {
	f.Prepend(tags.New("input", tags.Options{
		"value": s,
		"type":  "hidden",
		"name":  "authenticity_token",
	}))
}
820026
func Setup(c *Client) error {
	var err error

	client = c

	config, err = loadConfig()
	if err != nil {
		return err
	}

	setupLogging()
	err = setupStore()
	if err != nil {
		return err
	}

	if needsRegistration() {
		registrationInfo.registrationID = generateRegistrationID()
		textSecureStore.SetLocalRegistrationID(registrationInfo.registrationID)

		registrationInfo.password = generatePassword()
		textSecureStore.storeHTTPPassword(registrationInfo.password)

		registrationInfo.signalingKey = generateSignalingKey()
		textSecureStore.storeHTTPSignalingKey(registrationInfo.signalingKey)

		identityKey = axolotl.GenerateIdentityKeyPair()
		err := textSecureStore.SetIdentityKeyPair(identityKey)
		if err != nil {
			return err
		}

		err = registerDevice()
		if err != nil {
			return err
		}
	}
	registrationInfo.registrationID, err = textSecureStore.GetLocalRegistrationID()
	if err != nil {
		return err
	}
	registrationInfo.password, err = textSecureStore.loadHTTPPassword()
	if err != nil {
		return err
	}
	registrationInfo.signalingKey, err = textSecureStore.loadHTTPSignalingKey()
	if err != nil {
		return err
	}
	setupTransporter()
	identityKey, err = textSecureStore.GetIdentityKeyPair()
	return err
}
1183695
func (s *DescribeUserStackAssociationsInput) SetAuthenticationType(v string) *DescribeUserStackAssociationsInput {
	s.AuthenticationType = &v
	return s
}
819711
func (s *ResyncMFADeviceInput) SetAuthenticationCode2(v string) *ResyncMFADeviceInput {
	s.AuthenticationCode2 = &v
	return s
}
406344
func (s *CreateCustomMetadataInput) SetAuthenticationToken(v string) *CreateCustomMetadataInput {
	s.AuthenticationToken = &v
	return s
}
134284
func (s *DeleteFolderInput) SetAuthenticationToken(v string) *DeleteFolderInput {
	s.AuthenticationToken = &v
	return s
}
294984
func (s *SmsMfaConfigType) SetSmsAuthenticationMessage(v string) *SmsMfaConfigType {
	s.SmsAuthenticationMessage = &v
	return s
}
305945
func (s *UserPoolType) SetSmsAuthenticationMessage(v string) *UserPoolType {
	s.SmsAuthenticationMessage = &v
	return s
}
1218502
func (s *DeactivateUserInput) SetAuthenticationToken(v string) *DeactivateUserInput {
	s.AuthenticationToken = &v
	return s
}