Module Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If CompareEq NameLoad Str body Return Call AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad BinOpAdd NameLoad NameLoad attr Str attr orelse If CompareEq NameLoad Str body TryExcept body Import alias handlers ExceptHandler type NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr Str If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Return Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad orelse If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str Return Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Raise Call NameLoad BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot Call AttributeLoad NameLoad attr Str Str body Raise Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return CompareIn Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Dict Str Str NameLoad NameLoad If Call NameLoad AttributeLoad NameLoad attr body Return SubscriptLoad AttributeLoad NameLoad attr Index Num Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr keyword SubscriptLoad NameLoad Index Str keyword SubscriptLoad NameLoad Index Str keyword NameLoad If CompareEq SubscriptLoad NameLoad Index Str Str body If Call NameLoad SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str Call AttributeLoad SubscriptLoad NameLoad Index Str attr Str Return CompareEq NameLoad SubscriptLoad NameLoad Index Str orelse Return CompareIsNot Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot Call AttributeLoad NameLoad attr SubscriptLoad SubscriptLoad NameLoad Index Str Index Str NameLoad body Raise Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Str Assign NameStore SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Str Index Str If CompareEq NameLoad Str body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad orelse Expr Str Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Dict Str NameLoad Return TupleLoad NameLoad NameLoad decorator_list decorator_list
N/A N/A cherrypy N/A hashlib N/A re N/A six girder events girder.utility config model_base Model ValidationException token genToken Password N/A Model N/A N/A 
    This model deals with managing user passwords.
     initialize N/A N/A self N/A N/A N/A N/A self name password N/A _digest N/A N/A self alg password salt N/A None N/A N/A 
        Helper method to perform the password digest.

        :param alg: The hash algorithm to use.
        :type alg: str - 'sha512' | 'bcrypt'
        :param password: The password to digest.
        :type password: str
        :param salt: The salt to use. In the case of bcrypt,
                     when storing the password, pass None;
                     when testing the password, pass the hashed value.
        :type salt: None or str
        :returns: The hashed value as a string.
         N/A cur_config N/A N/A config getConfig N/A N/A alg sha512 N/A N/A N/A N/A N/A N/A hashlib sha512 N/A N/A N/A password salt encode utf8 hexdigest N/A N/A N/A alg bcrypt N/A N/A N/A N/A bcrypt N/A N/A N/A ImportError N/A N/A N/A Exception Bcrypt module is not installed. See girder.local.cfg. N/A password N/A N/A password encode utf8 N/A N/A salt None N/A N/A rounds N/A int N/A N/A cur_config N/A auth N/A bcrypt_rounds N/A N/A N/A bcrypt hashpw password N/A N/A bcrypt gensalt rounds N/A N/A N/A isinstance salt N/A six text_type N/A N/A salt N/A N/A salt encode utf8 N/A N/A N/A bcrypt hashpw password salt N/A N/A N/A Exception N/A Unsupported hash algorithm: %s alg N/A validate N/A N/A self doc N/A N/A N/A N/A N/A N/A doc get _id N/A N/A N/A Exception Attempting to store empty password. N/A doc N/A hasPassword N/A N/A self user N/A N/A N/A 
        Returns whether or not the given user has a password stored in the
        database. If not, it is expected that the user will be authenticated by
        an external service.

        :param user: The user to test.
        :type user: dict
        :returns: bool
         N/A N/A hashAlg user N/A authenticate N/A N/A self user password N/A N/A N/A 
        Authenticate a user.

        :param user: The user document.
        :type user: dict
        :param password: The attempted password.
        :type password: str
        :returns: Whether authentication succeeded (bool).
         N/A N/A N/A N/A self hasPassword user N/A N/A e N/A N/A events trigger no_password_login_attempt N/A user password user password N/A N/A len N/A e responses N/A N/A N/A N/A e responses N/A -1 N/A N/A ValidationException This user does not have a password. You must log in with an external service, or reset your password. N/A hash N/A N/A self _digest salt N/A user N/A salt alg N/A user N/A hashAlg password password N/A N/A N/A user N/A hashAlg bcrypt N/A N/A N/A isinstance N/A user N/A salt N/A six text_type N/A N/A N/A user N/A salt N/A N/A N/A user N/A salt encode utf8 N/A N/A hash N/A user N/A salt N/A N/A N/A N/A N/A self load hash False None N/A encryptAndStore N/A N/A self password N/A N/A N/A 
        Encrypt and store the given password. The exact internal details and
        mechanisms used for storage are abstracted away, but the guarantee is
        made that once this method is called on a password and the returned salt
        and algorithm are stored with the user document, calling
        Password.authenticate() with that user document and the same password
        will return True.

        :param password: The password to encrypt and store.
        :type password: str
        :returns: {tuple} (salt, hashAlg) The salt to store with the
                  user document and the algorithm used for secure
                  storage. Both should be stored in the corresponding
                  user document as 'salt' and 'hashAlg' respectively.
         N/A cur_config N/A N/A config getConfig N/A N/A N/A N/A re match N/A N/A cur_config N/A users N/A password_regex password N/A N/A N/A ValidationException N/A N/A cur_config N/A users N/A password_description password N/A alg N/A N/A N/A cherrypy config N/A auth N/A hash_alg N/A N/A alg bcrypt N/A N/A 
            With bcrypt, we actually need the one-to-one correspondence of
            hashed password to user, so we store the hash as the salt entry in
            the user table.
             N/A salt N/A N/A self _digest alg alg password password N/A N/A 
            With other hashing algorithms, we store the salt with the user
            and store the hashed value in a separate table with no
            correspondence to the user.
             N/A salt N/A genToken N/A hash N/A N/A self _digest salt salt alg alg password password N/A N/A N/A self save N/A _id hash N/A N/A salt alg N/A N/A