Chris Cormack
493dcede48
Working on Mozilla Persona support (browser id) This will let a user log into Koha using browser id, if their email address used matches the email address inside Koha. Once an assertion is received, we simply need to find the user that matches that email address, and create a session for them. opac/svc/login handles this part. The nice thing about it is, the user doesn't have to do anything, like linking their account. As long as the email address they are using to identify themselves in browserid is the same as the one in Koha it will just work. This is covered by a systempreference, to allow people to do it, and is of course totally opt in, it works alongside normal Koha (or any other method) of login. So only those choosing to use it, need use it Test Plan 1/ Make sure OPACBaseURL is set correctly 2/ Switch on the Persona syspref 3/ Make a borrower (or edit one) to have the email you plan to use as the primary email 4/ Click sign in with email, make or use a persona account 5/ Logout 6/ Check you can still login and logout the normal way Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: Works great. It's not browser dependent, but tested with chrome, firefox, opera and safari. Old an new login system works. Minor errors, addresed in follow-up. Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
84 lines
3 KiB
Text
84 lines
3 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
<body id="opac-main">
|
|
[% IF ( OpacNav ) %]<div id="doc3" class="yui-t1">[% ELSE %]<div id="doc3" class="yui-t7">[% END %]
|
|
<div id="bd">
|
|
[% INCLUDE 'masthead.inc' %]
|
|
|
|
<div id="yui-main">
|
|
|
|
<div class="yui-b">
|
|
[% IF ( opacuserlogin ) %]
|
|
[% IF ( loggedinusername ) %]
|
|
<div id="loggedin" class="yui-ge">
|
|
[% ELSE %]
|
|
<div id="notloggedin" class="yui-ge">
|
|
[% END %]
|
|
[% ELSE %]
|
|
<div id="notloggedin" class="yui-ge">
|
|
[% END %]
|
|
<div class="yui-u first">
|
|
[% IF ( koha_news_count ) %]
|
|
<div id="news" class="container">
|
|
<table>
|
|
[% FOREACH koha_new IN koha_news %]
|
|
<tr><th>[% koha_new.title %]</th></tr>
|
|
<tr><td><p>[% koha_new.new %]</p>
|
|
<p><i>(published on [% koha_new.newdate %])</i></p></td></tr>
|
|
[% END %]
|
|
</table>
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF ( display_daily_quote && daily_quote ) %]
|
|
<div id="daily-quote" class="container"><h1>Quote of the Day</h1><div><span id="daily-quote-text">[% daily_quote.text %]</span><span id="daily-quote-sep"> ~ </span><span id="daily-quote-source">[% daily_quote.source %]</span></div></div>
|
|
[% END %]
|
|
|
|
[% IF ( OpacMainUserBlock ) %]<div id="opacmainuserblock" class="container">[% OpacMainUserBlock %]</div>[% END %]
|
|
[% IF ( OpacMainUserBlockMobile ) %]<div id="opacmainuserblockmobile" class="container">[% OpacMainUserBlockMobile %]</div>[% END %]
|
|
|
|
</div>
|
|
|
|
[% IF ( opacuserlogin || OpacNavRight ) %]
|
|
<div class="yui-u">
|
|
[% IF ( opacuserlogin ) %]
|
|
[% UNLESS ( loggedinusername ) %]
|
|
[% UNLESS ( casAuthentication ) %]
|
|
<div id="login" class="container clearfix">
|
|
<form action="/cgi-bin/koha/opac-user.pl" method="post" name="auth" id="auth">
|
|
<input type="hidden" name="koha_login_context" value="opac" />
|
|
<fieldset class="brief">
|
|
<legend>Log in to your account:</legend>
|
|
<ol>
|
|
<li><label for="userid">Login:</label><input type="text" id="userid" size="10" name="userid" /></li>
|
|
<li><label for="password">Password:</label><input type="password" id="password" size="10" name="password" /></li>
|
|
</ol> <fieldset class="action">
|
|
<input type="submit" value="Log In" class="submit" />
|
|
|
|
[% IF PatronSelfRegistration && PatronSelfRegistrationDefaultCategory %]<div id="patronregistration">Don't have an account? <a href="/cgi-bin/koha/opac-memberentry.pl">Register here.</a></div>[% END %]
|
|
|
|
</fieldset></fieldset>
|
|
</form>
|
|
</div>
|
|
[% END %]
|
|
[% IF persona %]
|
|
<a href="#" class="persona-button" id="browserid" ><span>Sign in with your Email</span></a>
|
|
[% END %]
|
|
[% END %]
|
|
[% END %]
|
|
[% IF ( OpacNavRight ) %]<div id="opacrightsidebar" class="container">[% OpacNavRight %]</div>[% END %]
|
|
</div>
|
|
[% END %]
|
|
</div>
|
|
</div>
|
|
</div>
|
|
[% IF ( OpacNav ) %]<div class="yui-b">
|
|
<div id="opacnav" class="container">
|
|
[% INCLUDE 'navigation.inc' %]
|
|
</div>
|
|
</div>[% END %]
|
|
</div>
|
|
|
|
[% INCLUDE 'opac-bottom.inc' %]
|