This app helps to integrate a Django app with the Deutsche Telekom Business Marketplace. It is based mostly on the Sample-Python-Application example.
-
Add
telekom_bmp
to yourINSTALLED_APPS
setting like this:INSTALLED_APPS = ( ... 'telekom_bmp', )
-
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', )
-
Include the
telekom_bmp
URLconf in your project'surls.py
:url(r'^telekom/', include('telekom_bmp.urls')),
-
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.
-
Run
python manage.py syncdb
orpython manage.py migrate
when using migrations to create the necessary table models.
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.