~guitarmanvt/canonical-identity-provider/saml2app

« back to all changes in this revision

Viewing changes to identityprovider/schema.py

  • Committer: John Samuel Anderson
  • Date: 2013-01-10 18:08:38 UTC
  • Revision ID: john@andersoninnovative.com-20130110180838-0gvun0s5v612xkle
Moved Saml2IdpSchema to ubuntu_sso_saml app.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
from django_configglue.schema import schemas
22
22
 
23
23
 
 
24
#Optionally import the Saml2IdpSchema:
 
25
try:
 
26
    from ubuntu_sso_saml.schema import Saml2IdpSchema
 
27
except:
 
28
    class Saml2IdpSchema(Schema):
 
29
        pass
 
30
 
24
31
DjangoSchema = schemas.get('1.3')
25
32
 
26
33
 
27
 
class Saml2IdpSchema(Schema):
28
 
    """
29
 
    Configglue schema for saml2idp for upstream tag 0.16.
30
 
    """
31
 
    __version__ = '0.16'
32
 
 
33
 
    class saml2(Section):
34
 
        saml2idp_config = DictOption()
35
 
        saml2idp_remotes = DictOption(
36
 
            item=DictOption(spec={
37
 
                'acs_url': StringOption(),
38
 
                'processor': StringOption(),
39
 
                'links': ListOption(item=TupleOption(length=2, raw=True)),
40
 
            }),
41
 
        )
42
 
 
43
 
 
44
34
class UpperCaseDictOption(DictOption):
45
35
    """ A DictOption with all upper-case keys. """
46
36
    def parse(self, section, parser=None, raw=False):