Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
ӍEYc@s÷ddlZddlZddlmZddlmZddlZddlmZddlm	Z	ddlm
Z
ddlmZeje
ƒZejejƒde	jfd	„ƒYƒZeƒZd
efd„ƒYZdefd
„ƒYZdS(iÿÿÿÿN(tcfg(t
positional(taccess(tbase(t
exceptions(tutilstAuthcBszeZdZed„ƒZeƒddded„ƒZe	d„ƒZ
e
jd„ƒZ
d„Ze
jdd„ƒZRS(s¿Identity V2 Authentication Plugin.

    :param string auth_url: Identity service endpoint for authorization.
    :param string trust_id: Trust ID for trust scoping.
    :param string tenant_id: Tenant ID for project scoping.
    :param string tenant_name: Tenant name for project scoping.
    :param bool reauthenticate: Allow fetching a new token if the current one
                                is going to expire. (optional) default True
    cCs\tt|ƒjƒ}|jtjdddƒtjdddƒtjdddƒgƒ|S(Ns	tenant-idthelps	Tenant IDstenant-namesTenant Namestrust-idsTrust ID(tsuperRtget_optionstextendRtStrOpt(tclstoptions((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyR	(scCs>tt|ƒjd|d|ƒ||_||_||_dS(Ntauth_urltreauthenticate(RRt__init__t	_trust_idt	tenant_idttenant_name(tselfRttrust_idRRR((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyR4s
		cCs|jS(N(R(R((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyRAscCs
||_dS(N(R(Rtvalue((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyRFsc
Ksidd6}|jjdƒd}i|j|ƒd6}|jrV|j|dd<n|jrs|j|dd<n|jr|j|dd<ntjd	|ƒ|j|d
|d|dt	d
t	ƒ}y|j
ƒd}Wn)ttfk
rt
jd|ƒ‚nXtj|S(Nsapplication/jsontAcceptt/s/tokenstauthttenantIdt
tenantNameRs#Making authentication request to %stjsontheaderst
authenticatedtlogRtresponse(Rtrstript
get_auth_dataRRRt_loggertdebugtposttFalseRtKeyErrort
ValueErrorRtInvalidResponseRtAccessInfoV2(RtsessiontkwargsRturltparamstrespt	resp_data((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pytget_auth_refKs"
			cCsdS(s%Return the authentication section of an auth plugin.

        :param dict headers: The headers that will be sent with the auth
                             request if a plugin needs to add to them.
        :return: A dict of authentication data for the auth type.
        :rtype: dict
        N((RR((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyR"bs	N(t__name__t
__module__t__doc__tclassmethodR	RtNonetTrueRtpropertyRtsetterR1tabctabstractmethodR"(((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyRs
	tPasswordcBs˜eZdZedƒed
ed„ƒZed„ƒZej	d„ƒZed„ƒZ
e
j	d„ƒZ
d
d„Zed„ƒZ
ed	„ƒZRS(sìA plugin for authenticating with a username and password.

    A username or user_id must be provided.

    :param string auth_url: Identity service endpoint for authorization.
    :param string username: Username for authentication.
    :param string password: Password for authentication.
    :param string user_id: User ID for authentication.
    :param string trust_id: Trust ID for trust scoping.
    :param string tenant_id: Tenant ID for tenant scoping.
    :param string tenant_name: Tenant name for tenant scoping.
    :param bool reauthenticate: Allow fetching a new token if the current one
                                is going to expire. (optional) default True

    :raises TypeError: if a user_id or username is not provided.
    icKstt|ƒj|||tkrF|tkrFd}t|ƒ‚n|tkr[d}n|tkrpd}n||_||_||_dS(Ns0You need to specify either a username or user_id(	RR<Rt_NOT_PASSEDt	TypeErrorR6tuser_idt	_usernamet	_password(RRtusernametpasswordR?R,tmsg((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyRƒs				cCs|jS(N(R@(R((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyRB•scCs
||_dS(N(R@(RR((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyRBšscCs|jS(N(RA(R((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyRCŸscCs
||_dS(N(RA(RR((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyRC¤scCsMi|jd6}|jr)|j|d<n|jrB|j|d<ni|d6S(NRCRBtuserIdtpasswordCredentials(RCRBR?(RRR((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyR"©s		cKsD|jdƒp|js+tjƒ|d<ntt|ƒj||S(NRC(tgettos_passwordRtprompt_user_passwordRR<tload_from_argparse_arguments(Rt	namespaceR,((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyRJ³sc	Csntt|ƒjƒ}|jtjdddddddƒtjdddƒtjd	d
tddƒgƒ|S(NRBtdesttdeprecated_names	user-nameRsUsername to login withsuser-idsUser ID to login withRCtsecretsPassword to use(RR<R	R
RRR7(RR
((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyR	»sN(R2R3R4RR=R6RR8RBR9RCR"R5RJR	(((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyR<qs	
tTokencBsSeZdZd„Zed„ƒZejd„ƒZdd„Ze	d„ƒZ
RS(s
A plugin for authenticating with an existing token.

    :param string auth_url: Identity service endpoint for authorization.
    :param string token: Existing token for authentication.
    :param string tenant_id: Tenant ID for tenant scoping.
    :param string tenant_name: Tenant name for tenant scoping.
    :param string trust_id: Trust ID for trust scoping.
    :param bool reauthenticate: Allow fetching a new token if the current one
                                is going to expire. (optional) default True
    cKs&tt|ƒj||||_dS(N(RRORt_token(RRttokenR,((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyR×scCs|jS(N(RP(R((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyRQÛscCs
||_dS(N(RP(RR((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyRQàscCs1|dk	r|j|d<nii|jd6d6S(NsX-Auth-TokentidRQ(R6RQ(RR((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyR"åscCs>tt|ƒjƒ}|jtjddtddƒgƒ|S(NRQRNRRO(RROR	R
RRR7(RR
((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyR	êsN(R2R3R4RR8RQR9R6R"R5R	(((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyROËs
	(R:tloggingtoslo_configRRtsixtkeystoneclientRtkeystoneclient.auth.identityRRRt	getLoggerR2R#t
add_metaclasstABCMetatBaseIdentityPluginRtobjectR=R<RO(((sT/home/tvault/.virtenv/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.pyt<module>
sQ	Z