From ab4d9a54677c2c17b186048ba5d86986a161bcef Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 13 May 2015 16:44:43 -0400 Subject: generalized the openid selector to a login selector This includes some CSS changes to names of elements. Also, added Email login button (doesn't work yet of course), and brought back the small openid login buttons. Demoted yahoo and verison to small buttons. This makes the big buttons be the main login types, and the small buttons be provider-specific helpers. --- doc/style.css | 20 ++++++++++---------- doc/wikiicons/emaillogin.png | Bin 0 -> 685 bytes 2 files changed, 10 insertions(+), 10 deletions(-) create mode 100644 doc/wikiicons/emaillogin.png (limited to 'doc') diff --git a/doc/style.css b/doc/style.css index fe1eb903d..f0846c0d6 100644 --- a/doc/style.css +++ b/doc/style.css @@ -465,40 +465,40 @@ li.L8 { list-style: upper-alpha; } display: none; } -/* openid selector */ -#openid_choice { +/* login selector */ +#login_choice { display: none; } -#openid_input_area { +#login_input_area { clear: both; padding: 10px; } -#openid_btns, #openid_btns br { +#login_btns, #login_btns br { clear: both; } -#openid_highlight { +#login_highlight { background-color: black; float: left; } -.openid_large_btn { +.login_large_btn { padding: 1em 1.5em; border: 1px solid #DDD; margin: 3px; float: left; } -.openid_small_btn { +.login_small_btn { padding: 4px 4px; border: 1px solid #DDD; margin: 3px; float: left; } -a.openid_large_btn:focus { +a.login_large_btn:focus { outline: none; } -a.openid_large_btn:focus { +a.login_large_btn:focus { outline-style: none; } -.openid_selected { +.login_selected { border: 4px solid #DDD; } diff --git a/doc/wikiicons/emaillogin.png b/doc/wikiicons/emaillogin.png new file mode 100644 index 000000000..1b16befd6 Binary files /dev/null and b/doc/wikiicons/emaillogin.png differ -- cgit v1.2.3 From f8add0adb327a6514bbfc1773e1fc9577c98fa32 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 13 May 2015 17:56:36 -0400 Subject: rename openid selector files to login-selector --- doc/basewiki.mdwn | 2 +- doc/templates.mdwn | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/basewiki.mdwn b/doc/basewiki.mdwn index 8392884eb..b4aa60c78 100644 --- a/doc/basewiki.mdwn +++ b/doc/basewiki.mdwn @@ -10,7 +10,7 @@ It currently includes these pages: * [[templates]] * [[ikiwiki/formatting]] * [[ikiwiki/markdown]] -* [[ikiwiki/openid]] +* [[ikiwiki/login-selector]] * [[ikiwiki/pagespec]] * [[ikiwiki/directive]] * [[ikiwiki/subpage]] diff --git a/doc/templates.mdwn b/doc/templates.mdwn index 80372fcb7..525b4f8fc 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -92,7 +92,7 @@ Here is a full list of the template files used: * `editpage.tmpl`, `editconflict.tmpl`, `editcreationconflict.tmpl`, `editfailedsave.tmpl`, `editpagegone.tmpl`, `pocreatepage.tmpl`, `editcomment.tmpl` `commentmoderation.tmpl`, `renamesummary.tmpl`, - `passwordmail.tmpl`, `openid-selector.tmpl`, `revert.tmpl` - Parts of ikiwiki's user + `passwordmail.tmpl`, `login-selector.tmpl`, `revert.tmpl` - Parts of ikiwiki's user interface; do not normally need to be customised. -- cgit v1.2.3 From 5b459737a50d83ff94490d86d1b9a4438d4b50a1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 13 May 2015 18:37:24 -0400 Subject: Converted openid-selector into a more generic loginselector helper plugin. --- doc/plugins/write.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index c3f531b66..95f4a39df 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -458,6 +458,9 @@ object's "name" parameter to the authenticated user's name. Note that if the name is set to the name of a user who is not registered, a basic registration of the user will be automatically performed. +Auth plugins can use the loginselector helper plugin to let the user +select which authentication method to use. + ### sessioncgi hook(type => "sessioncgi", id => "foo", call => \&sessioncgi); -- cgit v1.2.3 From e34533d1a0e0fc90a669f7cb3c11cafc6b285b26 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 13 May 2015 18:50:40 -0400 Subject: email auth plugin now works through email address entry --- doc/plugins/emailauth.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/plugins/emailauth.pm (limited to 'doc') diff --git a/doc/plugins/emailauth.pm b/doc/plugins/emailauth.pm new file mode 100644 index 000000000..9ba26e40c --- /dev/null +++ b/doc/plugins/emailauth.pm @@ -0,0 +1,14 @@ +[[!template id=plugin name=emailauth core=1 author="[[Joey]]"]] +[[!tag type/auth]] + +This plugin lets users log into ikiwiki using any email address. To complete +the login, a one-time-use link is emailed to the user, and they can simply +open that link in their browser. + +It is enabled by default, but can be turned off if you want to only use +some other form of authentication, such as [[passwordauth]] or [[openid]]. + +Users who have logged in using emailauth will have their email address used as +their username. In places where the username is displayed, like the +RecentChanges page, the domain will be omitted, to avoid exposing the +user's email address. -- cgit v1.2.3 From f1d77f81933b4e4c38780a1934ac6daaaf0a9b80 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 13 May 2015 21:15:08 -0400 Subject: add emailauth.tmpl --- doc/templates.mdwn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/templates.mdwn b/doc/templates.mdwn index 525b4f8fc..c45316e44 100644 --- a/doc/templates.mdwn +++ b/doc/templates.mdwn @@ -92,8 +92,9 @@ Here is a full list of the template files used: * `editpage.tmpl`, `editconflict.tmpl`, `editcreationconflict.tmpl`, `editfailedsave.tmpl`, `editpagegone.tmpl`, `pocreatepage.tmpl`, `editcomment.tmpl` `commentmoderation.tmpl`, `renamesummary.tmpl`, - `passwordmail.tmpl`, `login-selector.tmpl`, `revert.tmpl` - Parts of ikiwiki's user - interface; do not normally need to be customised. + `passwordmail.tmpl`, `emailauth.tmpl, `login-selector.tmpl`, + `revert.tmpl` - Parts of ikiwiki's user interface; do not normally need + to be customised. [[!meta robots="noindex, follow"]] -- cgit v1.2.3 From 95e1e51caafbb3e4b179936b6d191ca87f47d4ae Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 13 May 2015 22:27:03 -0400 Subject: emailauth link sent and verified; user login works Still some work to do since the user name is an email address and should not be leaked. --- doc/plugins/emailauth.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc') diff --git a/doc/plugins/emailauth.pm b/doc/plugins/emailauth.pm index 9ba26e40c..8cb060e93 100644 --- a/doc/plugins/emailauth.pm +++ b/doc/plugins/emailauth.pm @@ -12,3 +12,6 @@ Users who have logged in using emailauth will have their email address used as their username. In places where the username is displayed, like the RecentChanges page, the domain will be omitted, to avoid exposing the user's email address. + +This plugin needs the [[!cpan Mail::SendMail]] perl module installed, +and able to send outgoing email. -- cgit v1.2.3