/usr/lib/python2.6/site-packages/keystoneclient/contrib/revoke
NameSizeModeActions
model.py116060644editdlrm
model.pyc91280644editdlrm
__init__.py00644editdlrm
__init__.pyc1720644editdlrm
Edit: /usr/lib/python2.6/site-packages/keystoneclient/contrib/revoke/model.pyc (9128B)
Ñò x7|]0}ˆi|dj o|ˆi|fVqqWdS(N(t__dict__R(t.0tkey(R(sR/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/contrib/revoke/model.pys Hs sOS-TRUST:trust_idsOS-OAUTH1:consumer_idsOS-OAUTH1:access_token_idt subsecondRR ( RRRRRRRtisotimetTrueR (Rtkeystevent((RsR/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/contrib/revoke/model.pytto_dictCs$ cCsd|t||ƒpdfS(Ns%s=%st*(tgetattr(RR((sR/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/contrib/revoke/model.pyt key_for_nameXs(t__name__t __module__R!R*R-(((sR/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/contrib/revoke/model.pyR9s cCst|itƒS(N(tmapR-R(R)((sR/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/contrib/revoke/model.pyt attr_keys\st RevokeTreecBs>eZdZdd„Zd„Zd„Zd„Zd„ZRS(sÆFast Revocation Checking Tree Structure The Tree is an index to quickly match tokens against events. Each node is a hashtable of key=value combinations from revocation events. The cCstƒ|_|i|ƒdS(N(Rt revoke_mapt add_events(Rt revoke_events((sR/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/contrib/revoke/model.pyR!is cCs[|i}x&t|ƒD]}|i|hƒ}qWt|i|id|iƒƒ|d<|S(szUpdates the tree based on a revocation event. Creates any necessary internal nodes in the tree corresponding to the fields of the revocation event. The leaf node will always be set to the latest 'issued_before' for events that are otherwise identical. :param: Event to add to the tree :returns: the event that was passed in. R (R3R1t setdefaulttmaxR R(RR)R3R$((sR/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/contrib/revoke/model.pyt add_eventms   c CsÍg}|i}xtD]R}|i|ƒ}|i|ƒ}|djoPn|i|||fƒ|}qW|i|djo|idƒnx5t|ƒD]'\}}}t |ƒp ||=qžqžWdS(s–Update the tree based on the removal of a Revocation Event Removes empty nodes from the tree from the leaf back to the root. If multiple events trace the same path, but have different 'issued_before' values, only the last is ever stored in the tree. So only an exact match on 'issued_before' ever triggers a removal :param: Event to remove from the tree R N( R3RR-RRtappendR tpoptreversedtany( RR)tstackR3RR$tnxttparenttchild((sR/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/contrib/revoke/model.pyt remove_events      cCst|i|pgƒS(N(R0R8(RR5((sR/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/contrib/revoke/model.pyR4sc Cshdddgd6ddgd6}|ig}xtD] }g}d|f}x°|D]¨}|i|i|ƒƒ|djo;x||id gƒD] }|i|id |ƒƒq’WqVxA|i||gƒD]*} |i|id ||| fƒƒqÐWqVWg} |D]} | dj o | | q q ~ }|ptSq6WxB|D]:} y| d |d jotSWqKtj oqKXqKWtS(smCheck if a token matches the revocation event Compare the values for each level of the tree with the values from the token, accounting for attributes that have alternative keys, and for wildcard matches. if there is a match, continue down the tree. if there is no match, exit early. token_data is a map based on a flattened view of token. The required fields are: 'expires_at','user_id', 'project_id', 'identity_domain_id', 'assignment_domain_id', 'trust_id', 'trustor_id', 'trustee_id' 'consumer_id', 'access_token_id' RRRR R Rs%s=*R troless role_id=%ss%s=%sR RN(R3RR9RRtFalseR'tKeyError( RRt alternativestpartial_matchesRtbundletwildcardttreeR talt_namet_[1]txtleaf((sR/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/contrib/revoke/model.pyt is_revoked s<   "&2   N( R.R/t__doc__RR!R8RAR4RN(((sR/tmp/pip-build-cD3xZi/python-keystoneclient/keystoneclient/contrib/revoke/model.pyR2`s     c Cs|d}htiti|dƒƒd6titi|dƒƒd6}|idhƒidƒ|d<|idƒ}|dj o|d|d s,     # … )