From 9c2a829ce35560009da99a01ae7aff31819a62de Mon Sep 17 00:00:00 2001 From: Morgan Fainberg Date: Wed, 16 Jul 2014 20:44:47 -0700 Subject: [PATCH] Mark the 'check_vX_token' methods deprecated The check_v2_token and check_v3_token perform the same work as the corresponding validate_vX_token methods on the provider api. The validate methods are used in favor of the check methods. This patchset marks the check methods as deprecated, slated for removal in the K cycle. Change-Id: I717dd93ce359439af238dcf1f3349e9477e6b82b bp: non-persistent-tokens --- keystone/token/provider.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/keystone/token/provider.py b/keystone/token/provider.py index 10726b94fb..d7d7907534 100644 --- a/keystone/token/provider.py +++ b/keystone/token/provider.py @@ -29,6 +29,7 @@ from keystone import exception from keystone.i18n import _ from keystone.openstack.common import log from keystone.openstack.common import timeutils +from keystone.openstack.common import versionutils CONF = config.CONF @@ -184,6 +185,11 @@ class Manager(manager.Manager): self._is_valid_token(token) return token + @versionutils.deprecated( + as_of=versionutils.deprecated.JUNO, + what='token_provider_api.check_v2_token', + in_favor_of='token_provider_api.validate_v2_token', + remove_in=+1) def check_v2_token(self, token_id, belongs_to=None): """Check the validity of the given V2 token. @@ -197,6 +203,11 @@ class Manager(manager.Manager): unique_id = self.unique_id(token_id) self.validate_v2_token(unique_id, belongs_to=belongs_to) + @versionutils.deprecated( + as_of=versionutils.deprecated.JUNO, + what='token_provider_api.check_v3_token', + in_favor_of='token_provider_api.validate_v3_token', + remove_in=+1) def check_v3_token(self, token_id): """Check the validity of the given V3 token.