model_credentials : typing.Sequence[~ChangeModelCredentialParams]
        Returns -> typing.Sequence[~ErrorResult]
16244
async def ChangeModelCredential(self, model_credentials):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='ModelManager',
                   request='ChangeModelCredential',
                   version=5,
                   params=_params)
        _params['model-credentials'] = model_credentials
        reply = await self.rpc(msg)
        return reply
622755
def credentials(opts)
      calback = lambda do
        credentials = nil
        unless opts[:access_key_id].empty? or opts[:secret_access_key].empty?
          credentials = Aws::Credentials.new opts[:access_key_id], opts[:secret_access_key]
        else
          if opts[:assume_role_arn].nil?
            if opts[:ecs_container_credentials_relative_uri].nil?
              credentials = Aws::SharedCredentials.new({retries: 2}).credentials
              credentials ||= Aws::InstanceProfileCredentials.new.credentials
              credentials ||= Aws::ECSCredentials.new.credentials
            else
              credentials = Aws::ECSCredentials.new({
                credential_path: opts[:ecs_container_credentials_relative_uri]
              }).credentials
            end
          else
            credentials = sts_credential_provider({
                            role_arn: opts[:assume_role_arn],
                            role_session_name: opts[:assume_role_session_name],
                            region: opts[:region]
                          }).credentials
          end
        end
        raise "No valid AWS credentials found." unless credentials.set?
        credentials
      end
      def calback.inspect
        credentials = self.call
        credentials.credentials.inspect
      end
      calback
    end
959329
def update_credentials(self, aws_access_key_id, aws_secret_access_key):
        '''  '''
        self.aws_access_key_id = aws_access_key_id
        self.aws_secret_access_key = aws_secret_access_key
945796
def get_credentials_arn(self):
        
        role = self.iam.Role(self.role_name)
        self.credentials_arn = role.arn
        return role, self.credentials_arn
1003625
private String authenticate(Credentials credentials, URI requestURI) throws AuthenticationException {
        if (!(credentials instanceof SpnegoCredentials)) {
            throw new AuthenticationException("Invalid credentials type provided to " + this.getClass().getName() + "." +
                    "Expected " + SpnegoCredentials.class.getName() + " but got " + credentials.getClass().getName());
        }
        final SpnegoCredentials spnegoCredentials = (SpnegoCredentials) credentials;
        try {
            initializeNegotiator(requestURI, spnegoCredentials);
            return getNegotiateToken();
        } catch (GSSException e) {
            throw new AuthenticationException("Could not authenticate", e);
        } catch (UnknownHostException e) {
            throw new AuthenticationException("Could not authenticate", e);
        }
    }
110592
function _loginEvrythng(credentials, successCallback, errorCallback) {

    if(!credentials || Utils.isFunction(credentials)) {
      throw new TypeError('Credentials are missing.');
    }

    // Send the authentication request to the REST API, which is a Promise.
    // Note that the context is passed from the above *app.login()* method
    // until the raw call in order to pass the correct scope's Api Key.
    return _authEvrythng.call(this, credentials).then(function (userResponse) {

      // Login was successful, apply callback and propagate response to the
      // next promise handler.
      if(successCallback) {
        Logger.warnCallbackDeprecation();
        successCallback(userResponse);
      }
      return userResponse;

    }, function (response) {

      // Login was not successful, call error callback and re-throw error.
      if(errorCallback) {
        Logger.warnCallbackDeprecation();
        errorCallback(response);
      }
      throw response;

    });
  }
34058
def RegisterCredentials(cls, credentials):
    
    if credentials.type_indicator in cls._credentials:
      raise KeyError(
          'Credentials object already set for type indicator: {0:s}.'.format(
              credentials.type_indicator))

    cls._credentials[credentials.type_indicator] = credentials
1074406
def set_auth_credentials(username, password):
    
    global _credentials, _dirty

    LOGGER.debug('Setting authentication credentials')
    _credentials = username, password
    _dirty = True
782258
function validateNewCredentialProperties (credentialConfig, credentialDetail) {
  // Tmp — horrible hack to remove.
  const credentialDetails = JSON.parse(JSON.stringify(credentialDetail));
  delete credentialDetails.scopes;

  const validationResult = validate(credentialConfig, credentialDetails);
  if (!validationResult.isValid) {
    return Promise.reject(new Error(validationResult.error));
  };

  return Promise.resolve(credentialDetails);
}
325728
def update_credentials(self, password):
        
        data = {
            'Password': password,
        }
        self._conn.patch(self.path, data=data)
1133340
def remove_credential(username)
      raise ArgumentError, "The username cannot be nil"   unless username
      raise ArgumentError, "The username cannot be empty" if username.empty?

      self.service.removeCredential(username.to_s)
      
      @credentials = nil
    end
511317
def _get_credentials(self):
        
        uri = URITemplate(self.baseuri + '/{username}/credentials').expand(
            username=self.username)

        resp = self.session.post(uri)

        self.handle_http_error(
            resp,
            custom_messages={
                401: "Token is not authorized",
                404: "Token does not have upload scope",
                429: "Too many requests"})
        return resp
522512
private void validateCredentials(String username, String password, ApiRequest request, IPolicyContext context,
            BasicAuthenticationConfig config, IAsyncResultHandler<Boolean> handler) {
        if (config.getStaticIdentity() != null) {
            staticIdentityValidator.validate(username, password, request, context, config.getStaticIdentity(), handler);
        } else if (config.getLdapIdentity() != null) {
            ldapIdentityValidator.validate(username, password, request, context, config.getLdapIdentity(), handler);
        } else if (config.getJdbcIdentity() != null) {
            jdbcIdentityValidator.validate(username, password, request, context, config.getJdbcIdentity(), handler);
        } else {
            handler.handle(AsyncResultImpl.create(Boolean.FALSE));
        }
    }
1072383
func OutputUpdateCredentialModelResult(ctx *cmd.Context, models []params.UpdateCredentialModelResult, showValid bool) {
	var valid []string
	invalid := map[string][]error{}
	for _, m := range models {
		if len(m.Errors) == 0 {
			valid = append(valid, m.ModelName)
			continue
		} else {
			var mError []error
			for _, anErr := range m.Errors {
				mError = append(mError, errors.Trace(anErr.Error))
			}
			invalid[m.ModelName] = mError
		}
	}

	if showValid && len(valid) > 0 {
		ctx.Infof("Credential valid for:")
		for _, v := range valid {
			ctx.Infof("  %v", v)
		}
	}
	if len(invalid) > 0 {
		// ensure we sort the valid, invalid slices so that the output is consistent
		i := 0
		names := make([]string, len(invalid))
		for k := range invalid {
			names[i] = k
			i++
		}
		sort.Strings(names)

		ctx.Infof("Credential invalid for:")
		for _, v := range names {
			ctx.Infof("  %v:", v)
			for _, e := range invalid[v] {
				ctx.Infof("    %v", e)
			}
		}
	}
}
1247470
def credentials
      return @credentials if @credentials
      output = %x"#{@command} #{@name}".lines

      password = output.shift
      username = output.find { |line| line.start_with? 'Username:' }.split(":").pop.strip
      @credentials = {:username => username, :password => password}
    end
689813
def credential=cr
      if File.exist?(cr) && File.file?(cr)
        cr = File.read cr
      end

      @credential = case cr
        when Hash, ActiveSupport::HashWithIndifferentAccess
          cr
        when String
          JSON.parse cr
        else
          raise "Invalid data type"
      end
    end
941887
def from_credentials(credentials, loop: asyncio.AbstractEventLoop=asyncio.get_event_loop()):
        
        return API(username=credentials.username, password=credentials.password,
                   database=credentials.database, session_id=credentials.session_id,
                   server=credentials.server, loop=loop)