Opened 10 years ago

Closed 10 years ago

#2305 closed enhancement (fixed)

Add support for directed identity in OpenID 2.0

Reported by: martin@… Owned by: Dalius
Priority: normal Component: AuthOpenIdPlugin
Severity: minor Keywords:
Cc: Trac Release: 0.11


There could be a config option for the openid plugin, where one could configure the OpenID provider to use. This might be useful in scenarios where a known (company wide) OpenID provider should be used for many projects or if the user would like to provide 'one click' usability for login.

Something like

default_identifier =

and the link 'Log in with OpenID' would automatically start the flow that is similar to currently entering to the identifier box and clicking 'log in'

My own interest of course is to use with this feature, so a patch might come soon :)

Attachments (0)

Change History (2)

comment:1 Changed 10 years ago by anonymous

Here's a quick patch to do exactly this:

Index: authopenid/
--- authopenid/	(revision 2892)
+++ authopenid/	(working copy)
@@ -55,6 +55,9 @@
          authentication (''since 0.9'').""")
     check_ip_mask = Option('trac', 'check_auth_ip_mask', '',
             """What mask should be applied to user address.""")
+    default_openid = Option('trac', 'default_openid', None,
+            """Default OpenID provider for directed identity.""")
     def _get_masked_address(self, address):
         mask = struct.unpack('>L', socket.inet_aton(self.check_ip_mask))[0]
@@ -144,6 +147,9 @@
             return self._do_logout(req)
     def _do_login(self, req):
+        if self.default_openid:
+           req.args['openid_identifier'] = self.default_openid
+           return self._do_verify(req)
         add_stylesheet(req, 'authopenid/css/openid.css')
         return 'openidlogin.html', {
             'action': req.href.openidverify(),

to configure, use

default_openid =

clicking the "OpenID Login" in the navbar initiates a directed identity login with Tested and works as expected.

comment:2 Changed 10 years ago by Dalius

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Dalius.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.