コード例 #1
0
ファイル: test_utils.py プロジェクト: cocoztho000/keystone
 def _pull_assertion_from_the_request_headers(self):
     # NOTE(dstanek): In a live system the bytes for the assertion are
     # pulled from the HTTP headers. These bytes may be decodable as
     # ISO-8859-1 according to Section 3.2.4 of RFC 7230. Let's assume
     # that our web server plugins are correctly encoding the data.
     context = dict(environment=mapping_fixtures.UNICODE_NAME_ASSERTION)
     data = mapping_utils.get_assertion_params_from_env(context)
     # NOTE(dstanek): keystone.auth.plugins.mapped
     return dict(data)
コード例 #2
0
 def _pull_assertion_from_the_request_headers(self):
     # NOTE(dstanek): In a live system the bytes for the assertion are
     # pulled from the HTTP headers. These bytes may be decodable as
     # ISO-8859-1 according to Section 3.2.4 of RFC 7230. Let's assume
     # that our web server plugins are correctly encoding the data.
     # Create a dummy application
     app = flask.Flask(__name__)
     with app.test_request_context(
             path='/path',
             environ_overrides=mapping_fixtures.UNICODE_NAME_ASSERTION):
         data = mapping_utils.get_assertion_params_from_env()
         # NOTE(dstanek): keystone.auth.plugins.mapped
         return dict(data)
コード例 #3
0
ファイル: test_utils.py プロジェクト: mahak/keystone
 def _pull_assertion_from_the_request_headers(self):
     # NOTE(dstanek): In a live system the bytes for the assertion are
     # pulled from the HTTP headers. These bytes may be decodable as
     # ISO-8859-1 according to Section 3.2.4 of RFC 7230. Let's assume
     # that our web server plugins are correctly encoding the data.
     # Create a dummy application
     app = flask.Flask(__name__)
     with app.test_request_context(
             path='/path',
             environ_overrides=mapping_fixtures.UNICODE_NAME_ASSERTION):
         data = mapping_utils.get_assertion_params_from_env()
         # NOTE(dstanek): keystone.auth.plugins.mapped
         return dict(data)
コード例 #4
0
def extract_assertion_data(context):
    assertion = dict(utils.get_assertion_params_from_env(context))
    return assertion