HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/auth/__pycache__/keystone.cpython-310.pyc
o

�N�g��@szdZzddlmZmZddlmZWn	eyYnwdd�Zdd�Ze	dkr;iZ
ed	d	�r5ed
�dSed�dSdS)
z]
Provide authentication using OpenStack Keystone

:depends:   - keystoneclient Python module
�)�AuthorizationFailure�Unauthorized)�clientcCs ztdWStyYdSw)zD
    Try and get the URL from the config, else return localhost
    zkeystone.auth_urlzhttp://localhost:35357/v2.0)�__opts__�KeyError�rr�F/opt/saltstack/salt/lib/python3.10/site-packages/salt/auth/keystone.py�get_auth_urls

�r	c	Cs6ztj||t�d�}|��WSttfyYdSw)z
    Try and authenticate
    )�username�passwordZauth_urlF)rZClientr	Zauthenticaterr)r
rZkeystonerrr�auths�
�r�__main__�testZ
AuthenticatedzFailed to authenticateN)�__doc__Zkeystoneclient.exceptionsrrZkeystoneclient.v2_0r�ImportErrorr	r�__name__r�printrrrr�<module>s�


�