def _validate_token(self, req, token_id): """Validates the token, and that it belongs to the specified tenant""" belongs_to = req.GET.get('belongsTo') service_ids = None if extension_reader.is_extension_supported(self.options, 'hpidm'): # service IDs are only relevant if hpidm extension is enabled service_ids = req.GET.get('HP-IDM-serviceId') return self.identity_service.validate_token( utils.get_auth_token(req), token_id, belongs_to, service_ids)
def _validate_token(self, req, token_id): """Validates the token, and that it belongs to the specified tenant""" belongs_to = req.GET.get('belongsTo') service_ids = None if extension_reader.is_extension_supported(self.options, 'hpidm'): # service IDs are only relevant if hpidm extension is enabled service_ids = req.GET.get('HP-IDM-serviceId') return self.identity_service.validate_token(utils.get_auth_token(req), token_id, belongs_to, service_ids)
def __init__(self, options): self.options = options self.identity_service = service.IdentityService(options) logger.debug("Token controller init with HP-IDM extension: %s" % \ extension_reader.is_extension_supported(self.options, 'hpidm'))
def __init__(self, options): self.options = options self.identity_service = service.IdentityService(options) logger.debug("Token controller init with HP-IDM extension: %s" % \ extension_reader.is_extension_supported(self.options, 'hpidm'))