Thomi Richards has proposed merging lp:~thomir/launchpad/devel-add-canonical-openid-settings into lp:launchpad.
Requested reviews: Launchpad code reviewers (launchpad-reviewers) For more details, see: https://code.launchpad.net/~thomir/launchpad/devel-add-canonical-openid-settings/+merge/294998 -- Your team Launchpad code reviewers is requested to review the proposed merge of lp:~thomir/launchpad/devel-add-canonical-openid-settings into lp:launchpad.
=== modified file 'configs/development/launchpad-lazr.conf' --- configs/development/launchpad-lazr.conf 2016-02-09 02:26:46 +0000 +++ configs/development/launchpad-lazr.conf 2016-05-18 00:44:14 +0000 @@ -94,6 +94,7 @@ [launchpad] enable_test_openid_provider: True +openid_canonical_root: https://testopenid.dev/ openid_provider_root: https://testopenid.dev/ code_domain: code.launchpad.dev default_batch_size: 5 === modified file 'configs/testrunner/launchpad-lazr.conf' --- configs/testrunner/launchpad-lazr.conf 2015-10-01 22:36:23 +0000 +++ configs/testrunner/launchpad-lazr.conf 2016-05-18 00:44:14 +0000 @@ -107,6 +107,7 @@ # We use the stub Google Service here which maps URL fragment to # to static content homepage_recent_posts_feed: http://launchpad.dev:8092/blog-feed +openid_canonical_root: http://testopenid.dev/ openid_provider_root: http://testopenid.dev/ openid_alternate_provider_roots: http://login1.dev/, http://login2.dev/ === modified file 'lib/lp/registry/model/gpgkey.py' --- lib/lp/registry/model/gpgkey.py 2016-03-21 05:33:45 +0000 +++ lib/lp/registry/model/gpgkey.py 2016-05-18 00:44:14 +0000 @@ -257,7 +257,7 @@ def getOwnerIdForPerson(self, owner): """See IGPGKeySet.""" - url = IOpenIDPersistentIdentity(owner).openid_identity_url + url = IOpenIDPersistentIdentity(owner).openid_canonical_url assert url is not None return url === modified file 'lib/lp/services/config/schema-lazr.conf' --- lib/lp/services/config/schema-lazr.conf 2016-05-13 14:12:38 +0000 +++ lib/lp/services/config/schema-lazr.conf 2016-05-18 00:44:14 +0000 @@ -851,6 +851,10 @@ # datatype: boolean launch: True +# The root URL of the canonical OpenID provider. This is used when constructing +# OpenID URLs as user identifiers for external services such as gpgservice. +openid_canonical_root: none + # URL to the OpenID provider to authenticate against. openid_provider_root: none === modified file 'lib/lp/services/openid/adapters/openid.py' --- lib/lp/services/openid/adapters/openid.py 2015-07-09 12:18:51 +0000 +++ lib/lp/services/openid/adapters/openid.py 2016-05-18 00:44:14 +0000 @@ -62,6 +62,15 @@ else: return '+id/' + identifier.identifier + @property + def openid_canonical_url(self): + openid_identifier = self.openid_identifier + if openid_identifier is None: + return None + return ( + config.launchpad.openid_canonical_root + + openid_identifier.encode('ascii')) + @adapter(IPerson) @implementer(IOpenIDPersistentIdentity) === modified file 'lib/lp/services/openid/interfaces/openid.py' --- lib/lp/services/openid/interfaces/openid.py 2015-10-14 15:22:01 +0000 +++ lib/lp/services/openid/interfaces/openid.py 2016-05-18 00:44:14 +0000 @@ -24,3 +24,5 @@ 'The OpenID identity URL for the user.') openid_identifier = Attribute( 'The OpenID identifier used with the request.') + openid_canonical_url = Attribute( + 'The OpenId canonical URL for the user.')
_______________________________________________ Mailing list: https://launchpad.net/~launchpad-reviewers Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-reviewers More help : https://help.launchpad.net/ListHelp

