Validate client's password.  Uses PUT to /clients/<client> interface.

        :Args:
            * *client*: (str) Client's ID
            * *password*: (str) Client's Password
19047
def client_validate_password(self, client, password):
        

        client = self._client_id(client)
        body = {
            "action": "validate_password",
            "auth_password": password
        }

        response = self._put(url.clients_id.format(id=client), body=body)
        self._check_response(response, 200)
1004024
def _authenticate(self, client):
        """"""
        yield client.authenticate(
            self._username, self._password, mechanism=self._auth_mechanism)
        returnValue(client)
755825
def authorize(credentials, client_class=Client):
    
    client = client_class(auth=credentials)
    client.login()
    return client
123406
def register(self, server=None):
        
        if (self.key or self.secret):
            return self.update()

        server_data = self.request(server)

        self.key = server_data["client_id"]
        self.secret = server_data["client_secret"]
        self.expirey = server_data["expires_at"]
895440
def client
      @client ||= (client = Clients.with_name(client_name)
                    client = client.use(database_name) if database_name_option
                    client.with(client_options))
    end
522824
def setup(cls, client_id, client_secret):
        
        cls.client_id = client_id
        cls.client_secret = client_secret
1325942
def user_chpasswd(user_id, password)
      payload = {
        :password => password, 
        :json => 1
      }
      res = http_put(:uri=>"/users/#{user_id}/chpasswd", :data=>payload, :fields=>x_cookie)
      return res.code
    end
666426
def set_password(self, password):
        
        self.password = Security.hash(password)
        self.save()
576077
def _verify_client(self, low):
        '''
        
        '''
        if 'client' not in low or low.get('client') not in self.saltclients:
            self.set_status(400)
            self.write("400 Invalid Client: Client not found in salt clients")
            self.finish()
            return False
        return True
664106
def check_password(password)
    return false unless key
    key == self.class.hash_password(password, key.split('|', 2).first)
  end
561022
def get_client(self, client_id):
        ''''''
        client_response = self.get_request('clients/%s' % client_id)
        return Client(self, client_response['client'])
1018030
def client_tokens(self):
        
        client_id, client_secret = self.get_auth_basic()
        if not client_id and not client_secret:
            client_id = self.query_kwargs.get('client_id', '')
            client_secret = self.query_kwargs.get('client_secret', '')
            if not client_id and not client_secret:
                client_id = self.body_kwargs.get('client_id', '')
                client_secret = self.body_kwargs.get('client_secret', '')

        return client_id, client_secret
427635
def authorize_client_credentials(
        self, client_id, client_secret=None, scope="private_agent"
    ):
        
        self.auth_data = {
            "grant_type": "client_credentials",
            "scope": [ scope ],
            "client_id": client_id,
            "client_secret": client_secret
        }

        self._do_authorize()
1081869
def password(self, request, data, client):
        

        data = self.get_password_grant(request, data, client)
        user = data.get('user')
        scope = data.get('scope')

        if constants.SINGLE_ACCESS_TOKEN:
            at = self.get_access_token(request, user, scope, client)
        else:
            at = self.create_access_token(request, user, scope, client)
            # Public clients don't get refresh tokens
            if client.client_type != 1:
                rt = self.create_refresh_token(request, user, scope, at, client)

        return self.access_token_response(at)
731403
def set_password(self, user, password):
        
        url = self._build_url(self.endpoint.set_password(id=user))
        return self._post(url, payload=dict(password=password))
1259487
def init_client(client_id):
    
    if client_id not in drivers:
        drivers[client_id] = init_driver(client_id)
    return drivers[client_id]
201191
def args_fixup():
    
    global saved_key_handle
    saved_key_handle = args.hmac_kh

    args.key_handle = pyhsm.util.key_handle_to_int(args.hmac_kh)

    if not (args.mode_otp or args.mode_short_otp or args.mode_totp or args.mode_hotp or args.mode_pwhash):
        my_log_message(args, syslog.LOG_ERR, 'No validation mode enabled')
        sys.exit(1)

    global client_ids
    if args.clients_file != None:
        if not args.mode_otp:
            my_log_message(args, syslog.LOG_ERR, 'Clients file should only be used with --otp.')
            sys.exit(1)
        client_ids = load_clients_file(args.clients_file)
        if not client_ids:
            my_log_message(args, syslog.LOG_ERR, 'Failed loading clients file "%s"' % (args.clients_file))
            sys.exit(1)
    else:
        # we accept failure to load this file when the default is used
        loaded_client_ids = load_clients_file(default_clients_file)
        if loaded_client_ids:
            args.clients_file = default_clients_file
            client_ids = loaded_client_ids