Did I find the right examples for you? yes no

All Samples(4)  |  Call(2)  |  Derive(0)  |  Import(2)

        def oauth2_settings(key=None, default=None):
    settings = get_current_registry().settings

    if key:
        value = settings.get('oauth2_provider.%s' % key, default)
        if value == 'true':
            return True
        elif value == 'false':
            return False
        else:
            return value
    else:
        return dict((x.split('.', 1)[1], y) for x, y in settings.iteritems()
            if x.startswith('oauth2_provider.'))
        


src/p/y/pyramid_oauth2_provider-0.2/pyramid_oauth2_provider/views.py   pyramid_oauth2_provider(Download)
from .errors import InvalidRequest
from .errors import UnsupportedGrantType
from .util import oauth2_settings
from .util import getClientCredentials
from .interfaces import IAuthCheck
    def wrapped(request):
        if (request.scheme != 'https' and
                oauth2_settings('require_ssl', default=True)):
            log.info('rejected request due to unsupported scheme: %s'
                     % request.scheme)

src/p/y/pyramid_oauth2_provider-HEAD/pyramid_oauth2_provider/views.py   pyramid_oauth2_provider(Download)
from .errors import InvalidRequest
from .errors import UnsupportedGrantType
from .util import oauth2_settings
from .util import getClientCredentials
from .interfaces import IAuthCheck
    def wrapped(request):
        if (request.scheme != 'https' and
                oauth2_settings('require_ssl', default=True)):
            log.info('rejected request due to unsupported scheme: %s'
                     % request.scheme)