Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Patch the openid.server.Server class to allow clients to provide sign…

…atory, encoder and decoder classes on instantiation.
  • Loading branch information...
commit 4c17264124c0b8e1fb2ec3a7403e7a86b8082606 1 parent 12efd78
julio@yola.com authored

Showing 1 changed file with 11 additions and 9 deletions. Show diff stats Hide diff stats

  1. +11 9 openid/server/server.py
20 openid/server/server.py
@@ -1504,12 +1504,14 @@ class Server(object):
1504 1504 associations I can make and how.
1505 1505 @type negotiator: L{openid.association.SessionNegotiator}
1506 1506 """
1507   -
1508   - signatoryClass = Signatory
1509   - encoderClass = SigningEncoder
1510   - decoderClass = Decoder
1511   -
1512   - def __init__(self, store, op_endpoint=None):
  1507 +
  1508 + def __init__(
  1509 + self,
  1510 + store,
  1511 + op_endpoint=None,
  1512 + signatoryClass=Signatory,
  1513 + encoderClass=SigningEncoder,
  1514 + decoderClass=Decoder):
1513 1515 """A new L{Server}.
1514 1516
1515 1517 @param store: The back-end where my associations are stored.
@@ -1525,9 +1527,9 @@ def __init__(self, store, op_endpoint=None):
1525 1527 if you want to respond to any version 2 OpenID requests.
1526 1528 """
1527 1529 self.store = store
1528   - self.signatory = self.signatoryClass(self.store)
1529   - self.encoder = self.encoderClass(self.signatory)
1530   - self.decoder = self.decoderClass(self)
  1530 + self.signatory = signatoryClass(self.store)
  1531 + self.encoder = encoderClass(self.signatory)
  1532 + self.decoder = decoderClass(self)
1531 1533 self.negotiator = default_negotiator.copy()
1532 1534
1533 1535 if not op_endpoint:

0 comments on commit 4c17264

Please sign in to comment.
Something went wrong with that request. Please try again.