Ejemplo n.º 1
0
 def validate_token(self, request):
     token_id = request.context_dict.get('subject_token_id')
     window_seconds = authorization.token_validation_window(request)
     include_catalog = 'nocatalog' not in request.params
     token_data = self.token_provider_api.validate_token(
         token_id, window_seconds=window_seconds)
     if not include_catalog and 'catalog' in token_data['token']:
         del token_data['token']['catalog']
     return render_token_data_response(token_id, token_data)
Ejemplo n.º 2
0
 def check_token(self, request):
     token_id = request.context_dict.get('subject_token_id')
     window_seconds = authorization.token_validation_window(request)
     token_data = self.token_provider_api.validate_token(
         token_id, window_seconds=window_seconds)
     # NOTE(morganfainberg): The code in
     # ``keystone.common.wsgi.render_response`` will remove the content
     # body.
     return render_token_data_response(token_id, token_data)
Ejemplo n.º 3
0
 def validate_token(self, request):
     token_id = request.context_dict.get('subject_token_id')
     window_seconds = authorization.token_validation_window(request)
     include_catalog = 'nocatalog' not in request.params
     token_data = self.token_provider_api.validate_token(
         token_id, window_seconds=window_seconds)
     if not include_catalog and 'catalog' in token_data['token']:
         del token_data['token']['catalog']
     return render_token_data_response(token_id, token_data)
Ejemplo n.º 4
0
 def check_token(self, request):
     token_id = request.context_dict.get('subject_token_id')
     window_seconds = authorization.token_validation_window(request)
     token_data = self.token_provider_api.validate_token(
         token_id, window_seconds=window_seconds)
     # NOTE(morganfainberg): The code in
     # ``keystone.common.wsgi.render_response`` will remove the content
     # body.
     return render_token_data_response(token_id, token_data)
Ejemplo n.º 5
0
    def validate_token(self, request):
        token_id = request.subject_token
        window_seconds = authorization.token_validation_window(request)
        include_catalog = 'nocatalog' not in request.params

        token = PROVIDERS.token_provider_api.validate_token(
            token_id, window_seconds=window_seconds)
        token_reference = controller.render_token_response_from_model(
            token, include_catalog=include_catalog)

        return render_token_data_response(token.id, token_reference)
Ejemplo n.º 6
0
    def check_token(self, request):
        token_id = request.subject_token
        window_seconds = authorization.token_validation_window(request)
        include_catalog = 'nocatalog' not in request.params
        token = PROVIDERS.token_provider_api.validate_token(
            token_id, window_seconds=window_seconds)
        token_reference = controller.render_token_response_from_model(
            token, include_catalog=include_catalog)
        # NOTE(morganfainberg): The code in
        # ``keystone.common.wsgi.render_response`` will remove the content
        # body.

        return render_token_data_response(token.id, token_reference)