/usr/lib/python2.6/site-packages/keystoneauth1/identity/v3
Edit: /usr/lib/python2.6/site-packages/keystoneauth1/identity/v3/oidc.pyc (10473B)
Ñò
7
Wc @ s d d k l Z d d k l Z d d k l Z d Z d e i f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d
S( iÿÿÿÿ( t
positional( t access( t
federationt OidcAuthorizationCodet OidcPasswordt _OidcBasec B s) e Z d Z d „ Z d „ Z d „ Z RS( 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
K sP t t | ƒ i | | | | | | _ | | _ | | _ | | _ | | _ d S( s The 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( t superR t __init__t client_idt
client_secrett access_token_endpointt
grant_typet access_token_type(
t selft auth_urlt identity_providert protocolR R R
R R t kwargs( ( sE /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/identity/v3/oidc.pyR s ( c C s( | i | i d | d | d t ƒ} | S( s Exchange 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_autht datat
authenticated( t postR
t False( R
t sessiont client_autht payloadR
t op_response( ( sE /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/identity/v3/oidc.pyt _get_access_tokenM s
c C s" | i | i d | d t ƒ} | S( sx Exchange 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
t headersR ( R t federated_token_urlR ( R
R R R t
auth_response( ( sE /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/identity/v3/oidc.pyt _get_keystone_tokeng s ( t __name__t
__module__t __doc__R R R ( ( ( sE /tmp/pip-build-wCUybK/keystoneauth1/keystoneauth1/identity/v3/oidc.pyR s 0 c B s; e Z d Z e d ƒ d d d d d d „ ƒ Z d „ Z RS( sD Implementation for OpenID Connect Resource Owner Password Credentiali t passwordt access_tokent profilec C sb t t | ƒ i d | 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
R R R R R R
R R N( R R R t usernameR# t scope( R
R R R R R R
R R R&