/django-telekom-bmp

Telekom BMP Integration App for Django

Primary LanguagePythonOtherNOASSERTION

Django Telekom BMP Integration

This app helps to integrate a Django app with the Deutsche Telekom Business Marketplace. It is based mostly on the Sample-Python-Application example.

Quick start

  1. Add telekom_bmp to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = (
        ...
        'telekom_bmp',
    )
  2. Set up a bunch of variables:

    # auth credentials
    TC_CONSUMER_KEY
    TC_CONSUMER_SECRET
    # classes that implement user and subscription relations
    TC_PAYLOAD_INTEGRATION
    TC_USER_INTEGRATION
    # regarding python social auth
    SOCIAL_AUTH_PIPELINE = (
       'social.pipeline.social_auth.social_details',
       'social.pipeline.social_auth.social_uid', 
       # this part needs to be implemented
       '<your_app>.pipeline.load_user', 
       'social.pipeline.social_auth.auth_allowed',
       'social.pipeline.social_auth.social_user',
       'social.pipeline.social_auth.associate_user',
       )
  3. Include the telekom_bmp URLconf in your project's urls.py:

    url(r'^telekom/', include('telekom_bmp.urls')),
  4. Add the auth backend for OpenID:

    AUTHENTICATION_BACKENDS = (
        ...
        'telekom_bmp.backend.OpenIDBackend',   
        ...
    )

    If your user model is not the standard Django model you may want to use an extended backend based on this one.

  5. Run python manage.py syncdb or python manage.py migrate when using migrations to create the necessary table models.

License

Copyright 2014 ezeep GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.