##// END OF EJS Templates
authn: Deprecate the is_container_auth function.
johbo -
r107:525242e6 default
parent child Browse files
Show More
@@ -25,6 +25,7 b' Authentication modules'
25 import logging
25 import logging
26 import time
26 import time
27 import traceback
27 import traceback
28 import warnings
28
29
29 from pyramid.threadlocal import get_current_registry
30 from pyramid.threadlocal import get_current_registry
30 from sqlalchemy.ext.hybrid import hybrid_property
31 from sqlalchemy.ext.hybrid import hybrid_property
@@ -219,13 +220,22 b' class RhodeCodeAuthPluginBase(object):'
219 """
220 """
220 raise NotImplementedError("Not implemented in base class")
221 raise NotImplementedError("Not implemented in base class")
221
222
223 def is_headers_auth(self):
224 """
225 Returns True if this authentication plugin uses HTTP headers as
226 authentication method.
227 """
228 return False
229
222 @hybrid_property
230 @hybrid_property
223 def is_container_auth(self):
231 def is_container_auth(self):
224 """
232 """
225 Deprecated method that indicates if this authentication plugin uses
233 Deprecated method that indicates if this authentication plugin uses
226 HTTP headers as authentication method.
234 HTTP headers as authentication method.
227 """
235 """
228 return False
236 warnings.warn(
237 'Use is_headers_auth instead.', category=DeprecationWarning)
238 return self.is_headers_auth
229
239
230 @hybrid_property
240 @hybrid_property
231 def allows_creating_users(self):
241 def allows_creating_users(self):
General Comments 0
You need to be logged in to leave comments. Login now