예제 #1
0
파일: yahoo.py 프로젝트: RedTurtle/velruse
def add_yahoo_login(config,
                    realm=None,
                    storage=None,
                    consumer_key=None,
                    consumer_secret=None,
                    login_path='/login/yahoo',
                    callback_path='/login/yahoo/callback',
                    name='yahoo'):
    """
    Add a Yahoo login provider to the application.

    OpenID parameters: realm, storage

    OAuth parameters: consumer_key, consumer_secret
    """
    provider = YahooConsumer(name, realm, storage,
                             consumer_key, consumer_secret)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider, attr='login', route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #2
0
def add_naver_login(config,
                    consumer_key=None,
                    consumer_secret=None,
                    login_path='/login/naver',
                    callback_path='/login/naver/callback',
                    name='naver'):
    provider = NaverOAuth2Provider(
        name,
        consumer_key,
        consumer_secret,
    )
    config.add_route(provider.login_route, login_path)
    config.add_view(
        provider,
        attr='login',
        route_name=provider.login_route,
        permission=NO_PERMISSION_REQUIRED,
    )
    config.add_route(
        provider.callback_route,
        callback_path,
        use_global_views=True,
        factory=provider.callback,
    )
    register_provider(config, name, provider)
예제 #3
0
def add_openid_login(config,
                     realm=None,
                     storage=None,
                     login_path='/login/openid',
                     callback_path='/login/openid/callback',
                     name='openid'):
    """
    Add a OpenID login provider to the application.

    `storage` should be an object conforming to the
    `openid.store.interface.OpenIDStore` protocol. This will default
    to `openid.store.memstore.MemoryStore`.
    """
    provider = OpenIDConsumer(name, realm, storage)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider.login,
                    route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route,
                     callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #4
0
def add_google_login(config,
                     consumer_key=None,
                     consumer_secret=None,
                     scope=None,
                     login_path='/login/google',
                     callback_path='/login/google/callback',
                     name='google'):
    """
    Add a Google login provider to the application supporting the new
    OAuth2 protocol.
    """
    provider = GoogleOAuth2Provider(
        name,
        consumer_key,
        consumer_secret,
        scope)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider, attr='login', route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #5
0
파일: google.py 프로젝트: cguardia/velruse
def add_google_login(config,
                     attrs=None,
                     realm=None,
                     storage=None,
                     consumer_key=None,
                     consumer_secret=None,
                     scope=None,
                     login_path='/login/google',
                     callback_path='/login/google/callback',
                     name='google'):
    """
    Add a Google login provider to the application.

    OpenID parameters: attrs, realm, storage

    OAuth parameters: consumer_key, consumer_secret, scope
    """
    provider = GoogleConsumer(name, attrs, realm, storage,
                              consumer_key, consumer_secret, scope)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider.login, route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #6
0
파일: linkedin.py 프로젝트: glim/velruse
def add_linkedin_login(config,
                       consumer_key,
                       consumer_secret,
                       login_path='/linkedin/login',
                       callback_path='/linkedin/login/callback',
                       name='linkedin',
                       scope='',
                       fields=''):
    """
    Add a Last.fm login provider to the application.
    """
    provider = LinkedInProvider(name,
                                consumer_key,
                                consumer_secret,
                                scope=scope,
                                fields=fields)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider,
                    attr='login',
                    route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route,
                     callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #7
0
파일: openid.py 프로젝트: rembish/velruse
def add_openid_login(config,
                     attrs=None,
                     oattrs=None,
                     realm=None,
                     storage=None,
                     login_path='/login/openid',
                     callback_path='/login/openid/callback',
                     name='openid'):
    """
    Add a OpenID login provider to the application.

    `attrs` and `oattrs` are required and optional OpenID attributes
    `storage` should be an object conforming to the
    `openid.store.interface.OpenIDStore` protocol. This will default
    to `openid.store.memstore.MemoryStore`.
    """
    provider = OpenIDConsumer(name, attrs=attrs, oattrs=oattrs, realm=realm, storage=storage)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider, attr='login', route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #8
0
파일: github.py 프로젝트: naktinis/velruse
def add_github_login(config,
                     consumer_key,
                     consumer_secret,
                     scope=None,
                     login_path='/login/github',
                     callback_path='/login/github/callback',
                     secure=True,
                     domain='github.com',
                     name='github'):
    """
    Add a Github login provider to the application.
    """
    provider = GithubProvider(name,
                              consumer_key,
                              consumer_secret,
                              scope,
                              secure,
                              domain)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider, attr='login', route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #9
0
def add_google_login(config,
                     consumer_key=None,
                     consumer_secret=None,
                     scope=None,
                     login_path='/login/google',
                     callback_path='/login/google/callback',
                     name='google'):
    """
    Add a Google login provider to the application supporting the new
    OAuth2 protocol.
    """
    provider = GoogleOAuth2Provider(name, consumer_key, consumer_secret, scope)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider,
                    attr='login',
                    route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route,
                     callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #10
0
def add_yahoo_login(config,
                    realm=None,
                    storage=None,
                    consumer_key=None,
                    consumer_secret=None,
                    login_path='/login/yahoo',
                    callback_path='/login/yahoo/callback',
                    name='yahoo'):
    """
    Add a Yahoo login provider to the application.

    OpenID parameters: realm, storage

    OAuth parameters: consumer_key, consumer_secret
    """
    provider = YahooConsumer(name, realm, storage, consumer_key,
                             consumer_secret)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider.login,
                    route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route,
                     callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #11
0
def add_github_login(config,
                     consumer_key,
                     consumer_secret,
                     scope=None,
                     login_path='/login/github',
                     callback_path='/login/github/callback',
                     secure=True,
                     domain='github.com',
                     name='github'):
    """
    Add a Github login provider to the application.
    """
    provider = GithubProvider(name, consumer_key, consumer_secret, scope,
                              secure, domain)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider,
                    attr='login',
                    route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route,
                     callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #12
0
def add_google_login(config,
                     attrs=None,
                     realm=None,
                     storage=None,
                     consumer_key=None,
                     consumer_secret=None,
                     scope=None,
                     login_path='/login/google',
                     callback_path='/login/google/callback',
                     name='google',
                     protocol='hybrid'):
    """
    Add a Google login provider to the application.

    A Google provider can be configured to use different protocols to
    authenticate with Google. If ``protocol`` is ``hybrid`` (the default)
    then it will use OpenID+OAuth. Otherwise, if ``protocol`` is ``oauth2``
    then authentication will happen via Google's OAuth2 endpoints.

    The OpenID+OAuth (hybrid) protocol can be configured for purely
    authentication by specifying only OpenID parameters. If you also wish
    to authorize your application to access the user's information you
    may specify OAuth credentials.

    - OpenID parameters
      + ``attrs``
      + ``realm``
      + ``storage``
    - OAuth parameters
      + ``consumer_key``
      + ``consumer_secret``
      + ``scope``

    The OAuth2 endpoint only requires the ``consumer_key`` and
    ``consumer_secret`` with an optional ``scope``.
    """
    if protocol == 'oauth2':
        provider = GoogleOAuth2Provider(name, consumer_key, consumer_secret,
                                        scope)
    else:
        provider = GoogleConsumer(name, attrs, realm, storage, consumer_key,
                                  consumer_secret, scope)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider,
                    attr='login',
                    route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route,
                     callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #13
0
def register_steam_provider(config):
    provider = SteamOpenIDConsumer(
        'steam',
        None,
        'http://ohnozombi.es/',
        None,
    )

    config.add_route(provider.login_route, '/login')
    config.add_view(provider, attr='login', route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, '/login/callback/',
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, 'steam', provider)
예제 #14
0
def add_google_login(config,
                     attrs=None,
                     realm=None,
                     storage=None,
                     consumer_key=None,
                     consumer_secret=None,
                     scope=None,
                     login_path='/login/google',
                     callback_path='/login/google/callback',
                     name='google'):
    """
    Add a Google login provider to the application using the OpenID+OAuth
    hybrid protocol.  This protocol can be configured for purely
    authentication by specifying only OpenID parameters. If you also wish
    to authorize your application to access the user's information you
    may specify OAuth credentials.

    - OpenID parameters
      + ``attrs``
      + ``realm``
      + ``storage``
    - OAuth parameters
      + ``consumer_key``
      + ``consumer_secret``
      + ``scope``
    """
    provider = GoogleConsumer(
        name,
        attrs,
        realm,
        storage,
        consumer_key,
        consumer_secret,
        scope)


    config.add_route(provider.login_route, login_path)
    config.add_view(provider, attr='login', route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #15
0
파일: yandex.py 프로젝트: tseaver/velruse
def add_yandex_login(
        config,
        consumer_key,
        consumer_secret,
        login_path='/login/{name}'.format(name=PROVIDER_NAME),
        callback_path='/login/{name}/callback'.format(name=PROVIDER_NAME),
        name=PROVIDER_NAME):
    """Add a Yandex login provider to the application."""
    provider = YandexProvider(name, consumer_key, consumer_secret)
    config.add_route(provider.login_route, login_path)
    config.add_view(provider,
                    attr='login',
                    route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)
    config.add_route(provider.callback_route,
                     callback_path,
                     use_global_views=True,
                     factory=provider.callback)
    register_provider(config, name, provider)
예제 #16
0
파일: twitter.py 프로젝트: naktinis/velruse
def add_twitter_login(
    config,
    consumer_key,
    consumer_secret,
    login_path="/login/twitter",
    callback_path="/login/twitter/callback",
    name="twitter",
):
    """
    Add a Twitter login provider to the application.
    """
    provider = TwitterProvider(name, consumer_key, consumer_secret)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider, attr="login", route_name=provider.login_route, permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path, use_global_views=True, factory=provider.callback)

    register_provider(config, name, provider)
예제 #17
0
def add_bitbucket_login(config,
                        consumer_key,
                        consumer_secret,
                        login_path='/bitbucket/login',
                        callback_path='/bitbucket/login/callback',
                        name='bitbucket'):
    """
    Add a Bitbucket login provider to the application.
    """
    provider = BitbucketProvider(name, consumer_key, consumer_secret)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider, attr='login', route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #18
0
def add_linkedin_login(config,
                       consumer_key,
                       consumer_secret,
                       login_path='/linkedin/login',
                       callback_path='/linkedin/login/callback',
                       name='linkedin'):
    """
    Add a Last.fm login provider to the application.
    """
    provider = LinkedInProvider(name, consumer_key, consumer_secret)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider.login, route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #19
0
파일: weibo.py 프로젝트: jonnyquan/velruse
def add_weibo_login(config,
                     consumer_key,
                     consumer_secret,
                     login_path='/login/weibo',
                     callback_path='/login/weibo/callback',
                     name='weibo'):
    """
    Add a Weibo login provider to the application.
    """
    provider = WeiboProvider(name, consumer_key, consumer_secret)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider.login, route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #20
0
def add_weibo_login(config,
                     consumer_key,
                     consumer_secret,
                     login_path='/login/weibo',
                     callback_path='/login/weibo/callback',
                     name='weibo'):
    """
    Add a Weibo login provider to the application.
    """
    provider = WeiboProvider(name, consumer_key, consumer_secret)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider.login, route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #21
0
def add_google_login(config,
                     attrs=None,
                     realm=None,
                     storage=None,
                     consumer_key=None,
                     consumer_secret=None,
                     scope=None,
                     login_path='/login/google',
                     callback_path='/login/google/callback',
                     name='google'):
    """
    Add a Google login provider to the application using the OpenID+OAuth
    hybrid protocol.  This protocol can be configured for purely
    authentication by specifying only OpenID parameters. If you also wish
    to authorize your application to access the user's information you
    may specify OAuth credentials.

    - OpenID parameters
      + ``attrs``
      + ``realm``
      + ``storage``
    - OAuth parameters
      + ``consumer_key``
      + ``consumer_secret``
      + ``scope``
    """
    provider = GoogleConsumer(name, attrs, realm, storage, consumer_key,
                              consumer_secret, scope)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider,
                    attr='login',
                    route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route,
                     callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #22
0
파일: qq.py 프로젝트: RedTurtle/velruse
def add_qq_login(config,
                 consumer_key,
                 consumer_secret,
                 scope=None,
                 login_path='/login/qq',
                 callback_path='/login/qq/callback',
                 name='qq'):
    """
    Add a QQ login provider to the application.
    """
    provider = QQProvider(name, consumer_key, consumer_secret, scope)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider, attr='login', route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #23
0
파일: facebook.py 프로젝트: hqman/velruse
def add_facebook_login(config,
                       consumer_key,
                       consumer_secret,
                       scope=None,
                       login_path='/login/facebook',
                       callback_path='/login/facebook/callback',
                       name='facebook'):
    """
    Add a Facebook login provider to the application.
    """
    provider = FacebookProvider(name, consumer_key, consumer_secret, scope)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider.login, route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #24
0
def add_facebook_login(config,
                       consumer_key,
                       consumer_secret,
                       scope=None,
                       login_path='/login/facebook',
                       callback_path='/login/facebook/callback',
                       name='facebook'):
    """
    Add a Facebook login provider to the application.
    """
    provider = FacebookProvider(name, consumer_key, consumer_secret, scope)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider.login, route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #25
0
def add_yandex_login(
    config,
    consumer_key,
    consumer_secret,
    login_path='/login/{name}'.format(name=PROVIDER_NAME),
    callback_path='/login/{name}/callback'.format(name=PROVIDER_NAME),
    name=PROVIDER_NAME
):
    """Add a Yandex login provider to the application."""
    provider = YandexProvider(name, consumer_key, consumer_secret)
    config.add_route(provider.login_route, login_path)
    config.add_view(
        provider,
        attr='login',
        route_name=provider.login_route,
        permission=NO_PERMISSION_REQUIRED
    )
    config.add_route(
        provider.callback_route, callback_path,
        use_global_views=True,
        factory=provider.callback
    )
    register_provider(config, name, provider)
예제 #26
0
def add_ubuntu_login(config,
                     realm=None,
                     storage=None,
                     login_path='/login/openid',
                     callback_path='/login/openid/callback'):
    """
    Add an Ubuntu SSO login provider to the application.

    `storage` should be an object conforming to the
    `openid.store.interface.OpenIDStore` protocol. This will default
    to `openid.store.memstore.MemoryStore`.
    """
    provider = UbuntuSSOConsumer(UBUNTU_SSO, realm, storage)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider, attr='login', route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, UBUNTU_SSO, provider)
예제 #27
0
def add_yasso_login(config,
                    authorize_url,
                    token_url,
                    userinfo_url,
                    client_id,
                    client_secret,
                    login_path='/login/yasso',
                    callback_path='/login/yasso/callback',
                    name='yasso'):
    """
    Add a Yasso login provider to the application.
    """
    provider = YassoProvider(name, authorize_url, token_url, userinfo_url,
                             client_id, client_secret)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider, attr='login', route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #28
0
def add_qq_login(config,
                 consumer_key,
                 consumer_secret,
                 scope=None,
                 login_path='/login/qq',
                 callback_path='/login/qq/callback',
                 name='qq'):
    """
    Add a QQ login provider to the application.
    """
    provider = QQProvider(name, consumer_key, consumer_secret, scope)

    config.add_route(provider.login_route, login_path)
    config.add_view(provider,
                    attr='login',
                    route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route,
                     callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #29
0
def add_google_login(config,
                     attrs=None,
                     realm=None,
                     storage=None,
                     consumer_key=None,
                     consumer_secret=None,
                     scope=None,
                     login_path='/login/google',
                     callback_path='/login/google/callback',
                     name='google',
                     protocol='hybrid'):
    """
    Add a Google login provider to the application.

    Supports two protocols: OAuth2 and Hybrid (OAuth + OpenID).

    OpenID parameters: attrs, realm, storage

    OAuth parameters: consumer_key, consumer_secret, scope
    """
    if protocol == 'oauth2':
        provider = GoogleOAuth2Provider(name, consumer_key, consumer_secret, scope)
    else:
        provider = GoogleConsumer(name, attrs, realm, storage,
                                  consumer_key, consumer_secret, scope)


    config.add_route(provider.login_route, login_path)
    config.add_view(provider, attr='login', route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)
예제 #30
0
파일: __init__.py 프로젝트: glim/velruse
def add_google_login(config,
                     attrs=None,
                     realm=None,
                     storage=None,
                     consumer_key=None,
                     consumer_secret=None,
                     scope=None,
                     login_path='/login/google',
                     callback_path='/login/google/callback',
                     name='google',
                     protocol='hybrid'):
    """
    Add a Google login provider to the application.

    A Google provider can be configured to use different protocols to
    authenticate with Google. If ``protocol`` is ``hybrid`` (the default)
    then it will use OpenID+OAuth. Otherwise, if ``protocol`` is ``oauth2``
    then authentication will happen via Google's OAuth2 endpoints.

    The OpenID+OAuth (hybrid) protocol can be configured for purely
    authentication by specifying only OpenID parameters. If you also wish
    to authorize your application to access the user's information you
    may specify OAuth credentials.

    - OpenID parameters
      + ``attrs``
      + ``realm``
      + ``storage``
    - OAuth parameters
      + ``consumer_key``
      + ``consumer_secret``
      + ``scope``

    The OAuth2 endpoint only requires the ``consumer_key`` and
    ``consumer_secret`` with an optional ``scope``.
    """
    if protocol == 'oauth2':
        provider = GoogleOAuth2Provider(
            name,
            consumer_key,
            consumer_secret,
            scope)
    else:
        provider = GoogleConsumer(
            name,
            attrs,
            realm,
            storage,
            consumer_key,
            consumer_secret,
            scope)


    config.add_route(provider.login_route, login_path)
    config.add_view(provider, attr='login', route_name=provider.login_route,
                    permission=NO_PERMISSION_REQUIRED)

    config.add_route(provider.callback_route, callback_path,
                     use_global_views=True,
                     factory=provider.callback)

    register_provider(config, name, provider)