/usr/lib/python2.6/site-packages/keystoneauth1/identity/v3
NameSizeModeActions
base.py99380644editdlrm
base.pyc100090644editdlrm
federation.py36540644editdlrm
federation.pyc37490644editdlrm
k2k.py76130644editdlrm
k2k.pyc67830644editdlrm
oidc.py115150644editdlrm
oidc.pyc104730644editdlrm
password.py28970644editdlrm
password.pyc28290644editdlrm
token.py19680644editdlrm
token.pyc22660644editdlrm
__init__.py10870644editdlrm
__init__.pyc6470644editdlrm
Edit: /usr/lib/python2.6/site-packages/keystoneauth1/identity/v3/oidc.pyc (10473B)
Ñò 7 Wc@sddklZddklZddklZd Zdeifd„ƒYZdefd„ƒYZdefd „ƒYZ d S( iÿÿÿÿ(t positional(taccess(t federationtOidcAuthorizationCodet OidcPasswordt _OidcBasecBs)eZdZd„Zd„Zd„ZRS(s­Base class for different OpenID Connect based flows The OpenID Connect specification can be found at:: ``http://openid.net/specs/openid-connect-core-1_0.html`` c KsPtt|ƒi|||| ||_||_||_||_||_dS(sThe OpenID Connect plugin expects the following: :param auth_url: URL of the Identity Service :type auth_url: string :param identity_provider: Name of the Identity Provider the client will authenticate against :type identity_provider: string :param protocol: Protocol name as configured in keystone :type protocol: string :param client_id: OAuth 2.0 Client ID :type client_id: string :param client_secret: OAuth 2.0 Client Secret :type client_secret: string :param access_token_endpoint: OpenID Connect Provider Token Endpoint, for example: https://localhost:8020/oidc/OP/token :type access_token_endpoint: string :param grant_type: OpenID Connect grant type, it represents the flow that is used to talk to the OP. Valid values are: "authorization_code", "refresh_token", or "password". :type grant_type: string :param access_token_type: OAuth 2.0 Authorization Server Introspection token type, it is used to decide which type of token will be used when processing token introspection. Valid values are: "access_token" or "id_token" :type access_token_type: string N(tsuperRt__init__t client_idt client_secrettaccess_token_endpointt grant_typetaccess_token_type( tselftauth_urltidentity_providertprotocolRR R R R tkwargs((sE/tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/identity/v3/oidc.pyRs(    cCs(|i|id|d|dtƒ}|S(sExchange a variety of user supplied values for an access token. :param session: a session object to send out HTTP requests. :type session: keystoneauth1.session.Session :param client_auth: a tuple representing client id and secret :type client_auth: tuple :param payload: a dict containing various OpenID Connect values, for example:: {'grant_type': 'password', 'username': self.username, 'password': self.password, 'scope': self.scope} :type payload: dict :param access_token_endpoint: URL to use to get an access token, for example: https://localhost/oidc/token :type access_token_endpoint: string t requests_authtdatat authenticated(tpostR tFalse(R tsessiont client_authtpayloadR t op_response((sE/tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/identity/v3/oidc.pyt_get_access_tokenMs  cCs"|i|id|dtƒ}|S(sxExchange an acess token for a keystone token. By Sending the access token in an `Authorization: Bearer` header, to an OpenID Connect protected endpoint (Federated Token URL). The OpenID Connect server will use the access token to look up information about the authenticated user (this technique is called instrospection). The output of the instrospection will be an OpenID Connect Claim, that will be used against the mapping engine. Should the mapping engine succeed, a Keystone token will be presented to the user. :param session: a session object to send out HTTP requests. :type session: keystoneauth1.session.Session :param headers: an Authorization header containing the access token. :type headers_: dict :param federated_token_url: Protected URL for federated authentication, for example: https://localhost:5000/v3/ OS-FEDERATION/identity_providers/bluepages/ protocols/oidc/auth :type federated_token_url: string theadersR(Rtfederated_token_urlR(R RRRt auth_response((sE/tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/identity/v3/oidc.pyt_get_keystone_tokengs (t__name__t __module__t__doc__RRR(((sE/tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/identity/v3/oidc.pyRs 0 cBs;eZdZedƒdddddd„ƒZd„ZRS(sDImplementation for OpenID Connect Resource Owner Password Credentialitpasswordt access_tokentprofilec Csbtt|ƒid|d|d|d|d|d|d|d|ƒ| |_| |_| |_d S( s–The OpenID Password plugin expects the following: :param username: Username used to authenticate :type username: string :param password: Password used to authenticate :type password: string :param scope: OpenID Connect scope that is requested from OP, defaults to "profile", for example: "profile email" :type scope: string RRRRR R R R N(RRRtusernameR#tscope( R RRRRR R R R R&R#R'((sE/tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/identity/v3/oidc.pyR‡s  cCs§|i|if}h|id6|id6|id6|id6}|i||||iƒ}|iƒ|i }hd|d6}|i |||i ƒ}t i d|ƒS(s§Authenticate with OpenID Connect and get back claims. This is a multi-step process. First an access token must be retrieved, to do this, the username and password, the OpenID Connect client ID and secret, and the access token endpoint must be known. Secondly, we then exchange the access token upon accessing the protected Keystone endpoint (federated auth URL). This will trigger the OpenID Connect Provider to perform a user introspection and retrieve information (specified in the scope) about the user in the form of an OpenID Connect Claim. These claims will be sent to Keystone in the form of environment variables. :param session: a session object to send out HTTP requests. :type session: keystoneauth1.session.Session :returns: a token data representation :rtype: :py:class:`keystoneauth1.access.AccessInfoV3` R R&R#R'sBearer t Authorizationtresp(RR R R&R#R'RR tjsonR RRRtcreate(R RRRtresponseR$R((sE/tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/identity/v3/oidc.pytget_unscoped_auth_ref¦s   N(R R!R"RtNoneRR-(((sE/tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/identity/v3/oidc.pyR„s  cBs8eZdZedƒddddd„ƒZd„ZRS(s4Implementation for OpenID Connect Authorization Codeitauthorization_codeR$c CsYtt|ƒid|d|d|d|d|d|d|d|ƒ| |_| |_d S( s÷The OpenID Authorization Code plugin expects the following: :param redirect_uri: OpenID Connect Client Redirect URL :type redirect_uri: string :param code: OAuth 2.0 Authorization Code :type code: string RRRRR R R R N(RRRt redirect_uritcode( R RRRRR R R R R0R1((sE/tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/identity/v3/oidc.pyRÎs cCs|i|if}h|id6|id6|id6}|i||||iƒ}|iƒ|i}hd|d6}|i |||i ƒ}t i d|ƒS(sdAuthenticate with OpenID Connect and get back claims. This is a multi-step process. First an access token must be retrieved, to do this, an authorization code and redirect URL must be given. Secondly, we then exchange the access token upon accessing the protected Keystone endpoint (federated auth URL). This will trigger the OpenID Connect Provider to perform a user introspection and retrieve information (specified in the scope) about the user in the form of an OpenID Connect Claim. These claims will be sent to Keystone in the form of environment variables. :param session: a session object to send out HTTP requests. :type session: keystoneauth1.session.Session :returns: a token data representation :rtype: :py:class:`keystoneauth1.access.AccessInfoV3` R R0R1sBearer R(R)( RR R R0R1RR R*R RRRR+(R RRRR,R$R((sE/tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/identity/v3/oidc.pyR-és      N(R R!R"RR.RR-(((sE/tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/identity/v3/oidc.pyRËs  N(sOidcAuthorizationCodes OidcPassword( Rt keystoneauth1Rtkeystoneauth1.identity.v3Rt__all__tFederationBaseAuthRRR(((sE/tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/identity/v3/oidc.pyt snG