Skip to content
This repository has been archived by the owner on Jan 8, 2019. It is now read-only.

Commit

Permalink
Merge pull request openid#32 from yola/master
Browse files Browse the repository at this point in the history
Patch the Server constructor
  • Loading branch information
willnorris committed Feb 8, 2012
2 parents 12efd78 + 4c17264 commit fc90195
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions openid/server/server.py
Expand Up @@ -1504,12 +1504,14 @@ class Server(object):
associations I can make and how.
@type negotiator: L{openid.association.SessionNegotiator}
"""

signatoryClass = Signatory
encoderClass = SigningEncoder
decoderClass = Decoder

def __init__(self, store, op_endpoint=None):

def __init__(
self,
store,
op_endpoint=None,
signatoryClass=Signatory,
encoderClass=SigningEncoder,
decoderClass=Decoder):
"""A new L{Server}.
@param store: The back-end where my associations are stored.
Expand All @@ -1525,9 +1527,9 @@ def __init__(self, store, op_endpoint=None):
if you want to respond to any version 2 OpenID requests.
"""
self.store = store
self.signatory = self.signatoryClass(self.store)
self.encoder = self.encoderClass(self.signatory)
self.decoder = self.decoderClass(self)
self.signatory = signatoryClass(self.store)
self.encoder = encoderClass(self.signatory)
self.decoder = decoderClass(self)
self.negotiator = default_negotiator.copy()

if not op_endpoint:
Expand Down

0 comments on commit fc90195

Please sign in to comment.