'Returns the given signed cookie if it validates, or None.
The decoded cookie value is returned as a byte string (unlike
`get_cookie`).
.. versionchanged:: 3.2.1
Added the ``min_version`` argument.  Introduced cookie version 2;
both versions 1 and 2 are accepted by default.'

def get_secure_cookie(self, name, value=None, max_age_days=31, min_version=None):

    self.require_setting('cookie_secret', 'secure    cookies')
    if (value is None):
        value = self.get_cookie(name)
    return decode_signed_value(self.application.settings['cookie_secret'], name, value, max_age_days=max_age_days, min_version=min_version)
