%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python2.7/site-packages/salt/auth/
Upload File :
Create Path :
Current File : //lib/python2.7/site-packages/salt/auth/rest.pyc

�
���^c@@sndZddlmZmZmZddlZddlZeje	�Z
dZd�Zd�Z
d�ZdS(uz
Provide authentication using a REST call

REST auth can be defined like any other eauth module:

.. code-block:: yaml

    external_auth:
      rest:
        ^url: https://url/for/rest/call
        fred:
          - .*
          - '@runner'

If there are entries underneath the ^url entry then they are merged with any responses
from the REST call.  In the above example, assuming the REST call does not return
any additional ACLs, this will authenticate Fred via a REST call and allow him to
run any execution module and all runners.

The REST call should return a JSON object that maps to a regular eauth YAML structure
as above.

i(tabsolute_importtprint_functiontunicode_literalsNurestcC@stS(N(t__virtualname__(((s2/usr/lib/python2.7/site-packages/salt/auth/rest.pyt__virtual__&scC@s,dtddkr$tdddStSdS(Nu^urlu
external_authurest(t__opts__tFalse(((s2/usr/lib/python2.7/site-packages/salt/auth/rest.pytrest_auth_setup*sc
C@s�t�}i|d6|d6}tjjj|ddd|dtdt�}|dd	kr�tjd
|�|dd
k	r�|dStStjd|�t	Sd
S(u
    REST authentication
    uusernameupasswordtmethoduPOSTtdatatstatustdecodeustatusi�u eauth REST call returned 200: %sudictueauth REST call failed: %sN(
RtsalttutilsthttptquerytTruetlogtdebugtNoneR(tusernametpasswordturlR	tresult((s2/usr/lib/python2.7/site-packages/salt/auth/rest.pytauth2s	$	(t__doc__t
__future__RRRtloggingtsalt.utils.httpRt	getLoggert__name__RRRRR(((s2/usr/lib/python2.7/site-packages/salt/auth/rest.pyt<module>s		

Zerion Mini Shell 1.0