summaryrefslogtreecommitdiffstats
path: root/src/doc/man/man3
ModeNameSize
-rw-r--r--ipcalc_c.35762logstatsplain
'n17' href='#n17'>17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
#!/usr/bin/python
#
# Copyright (C) 2014  Ipsilon project Contributors, for licensee see COPYING

from __future__ import absolute_import

from ipsilon.providers.common import ProviderBase
from ipsilon.providers.common import FACILITY
from ipsilon.providers.openid.auth import OpenID
from ipsilon.providers.openid.extensions.common import LoadExtensions
from ipsilon.util.plugin import PluginObject
from ipsilon.info.common import InfoMapping

from openid.server.server import Server
# TODO: Move this to the database
from openid.store.memstore import MemoryStore


class IdpProvider(ProviderBase):

    def __init__(self):
        super(IdpProvider, self).__init__('openid', 'openid')
        self.mapping = InfoMapping()
        self.page = None
        self.server = None
        self.basepath = None
        self.extensions = None
        self.description = """
Provides OpenID 2.0 authentication infrastructure. """

        self._options = {
            'default email domain': [
                """Default email domain, for users missing email property.""",
                'string',
                'example.com'
            ],
            'endpoint url': [
                """The Absolute URL of the OpenID provider""",
                'string',
                'http://localhost:8080/idp/openid/'
            ],
            'identity url template': [
                """The templated URL where identities are exposed.""",
                'string',
                'http://localhost:8080/idp/openid/id/%(username)s'
            ],
            'trusted roots': [
                """List of trusted relying parties.""",
                'list',
                []
            ],
            'untrusted roots': [
                """List of untrusted relying parties.""",
                'list',
                []
            ],
            'enabled extensions': [
                """List of enabled extensions""",
                'list',
                []
            ],
        }

    @property
    def endpoint_url(self):
        url = self.get_config_value('endpoint url')