Difference between revisions of "API:EPrints/DataObj/LoginTicket"

From EPrints Documentation
Jump to: navigation, search
Line 8: Line 8:
 
'''EPrints::DataObj::LoginTicket''' - user system loginticket
 
'''EPrints::DataObj::LoginTicket''' - user system loginticket
  
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
</div>
 
 
<!-- Pod2Wiki=head_description -->
 
<!-- Pod2Wiki=head_description -->
 
==DESCRIPTION==
 
==DESCRIPTION==
 
Login tickets are the database entries for the user's session cookies.
 
Login tickets are the database entries for the user's session cookies.
  
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
</div>
 
 
<!-- Pod2Wiki=head_configuration_settings -->
 
<!-- Pod2Wiki=head_configuration_settings -->
 
===Configuration Settings===
 
===Configuration Settings===
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
+
* user_cookie_timeout = undef
<span style='display:none'>User Comments</span>
+
: Set an expiry on the session cookies. This will cause the user's browser to delete the cookie after the given time. The time is specified according to {{API:PodLink|file=CGI|package_name=CGI|section=|text=CGI}}'s cookie constructor. This allows settings like <code>+1h</code> and <code>+7d</code>.
<!-- Edit below this comment -->
 
 
 
 
 
<!-- Pod2Wiki= -->
 
</div>
 
<!-- Pod2Wiki=item_user_cookie_timeout_undef -->
 
====user_cookie_timeout = undef====
 
 
 
Set an expiry on the session cookies. This will cause the user's browser to delete the cookie after the given time. The time is specified according to {{API:PodLink|file=CGI|package_name=CGI|section=|text=CGI}}'s cookie constructor. This allows settings like <tt>+1h</tt> and <tt>+7d</tt>.
 
  
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
+
* user_inactivity_timeout = 86400 * 7
<span style='display:none'>User Comments</span>
+
: How long to wait in seconds before logging the user out after their last activity.
<!-- Edit below this comment -->
 
  
 +
* user_session_timeout = undef
 +
: How long in seconds the user can stay logged in before they must re-log in. Defaults to never - if you do specify this setting you probably want to reduce user_inactivity_timeout to &lt;1 hour.
  
<!-- Pod2Wiki= -->
 
</div>
 
<!-- Pod2Wiki=item_user_inactivity_timeout_86400_7 -->
 
====user_inactivity_timeout = 86400 * 7====
 
 
How long to wait in seconds before logging the user out after their last activity.
 
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
</div>
 
<!-- Pod2Wiki=item_user_session_timeout_undef -->
 
====user_session_timeout = undef====
 
 
How long in seconds the user can stay logged in before they must re-log in. Defaults to never - if you do specify this setting you probably want to reduce user_inactivity_timeout to &lt;1 hour.
 
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
 
 
<!-- Pod2Wiki= -->
 
</div>
 
 
<!-- Pod2Wiki=head_methods -->
 
<!-- Pod2Wiki=head_methods -->
 
==METHODS==
 
==METHODS==
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
+
<!-- Pod2Wiki=head_get_system_field_info -->
<span style='display:none'>User Comments</span>
+
===get_system_field_info===
<!-- Edit below this comment -->
 
  
 +
<source lang="perl">$thing = EPrints::DataObj::Access->get_system_field_info
  
<!-- Pod2Wiki= -->
+
</source>
</div>
 
<!-- Pod2Wiki=item_get_system_field_info -->
 
===get_system_field_info===
 
 
 
$thing = EPrints::DataObj::Access-&gt;get_system_field_info
 
 
Core fields.
 
Core fields.
  
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
</div>
 
 
<!-- Pod2Wiki=head_class_methods -->
 
<!-- Pod2Wiki=head_class_methods -->
 
===Class Methods===
 
===Class Methods===
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
</div>
+
<!-- Pod2Wiki=head_get_dataset_id -->
<!-- Pod2Wiki=item_get_dataset_id -->
+
===get_dataset_id===
====get_dataset_id====
 
  
$dataset = EPrints::DataObj::LoginTicket-&gt;get_dataset_id
+
<source lang="perl">$dataset = EPrints::DataObj::LoginTicket->get_dataset_id
 +
 
 +
</source>
 
Returns the id of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs.
 
Returns the id of the [[API:EPrints/DataSet|EPrints::DataSet]] object to which this record belongs.
  
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
</div>
 
 
<!-- Pod2Wiki=head_object_methods -->
 
<!-- Pod2Wiki=head_object_methods -->
 
===Object Methods===
 
===Object Methods===
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
 
 
<!-- Pod2Wiki= -->
 
</div>
 
<!-- Pod2Wiki=item_set_cookies -->
 
====set_cookies====
 
 
 
  $ticket-&gt;set_cookies()
 
  $ticket-&gt;set_cookies()
 
Set the session cookies for this login ticket.
 
Set the session cookies for this login ticket.
 
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
<!-- Edit below this comment -->
 
 
 
<!-- Pod2Wiki= -->
 
</div>
 
<!-- Pod2Wiki=item_update -->
 
====update====
 
  
 
  $ticket-&gt;update()
 
  $ticket-&gt;update()
 
Update the login ticket by increasing the expiry time.
 
Update the login ticket by increasing the expiry time.
  
The expiry time is increased <tt>user_inactivity_timeout</tt> or 7 days.
+
The expiry time is increased <code>user_inactivity_timeout</code> or 7 days.
  
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
</div>
 
 
<!-- Pod2Wiki=head_see_also -->
 
<!-- Pod2Wiki=head_see_also -->
 
==SEE ALSO==
 
==SEE ALSO==
 
[[API:EPrints/DataObj|EPrints::DataObj]] and [[API:EPrints/DataSet|EPrints::DataSet]].
 
[[API:EPrints/DataObj|EPrints::DataObj]] and [[API:EPrints/DataSet|EPrints::DataSet]].
  
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
 
<span style='display:none'>User Comments</span>
 
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
</div>
 
 
<!-- Pod2Wiki=head_copyright -->
 
<!-- Pod2Wiki=head_copyright -->
 
==COPYRIGHT==
 
==COPYRIGHT==
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #ccepadding: 0em 1em 0em 1em; font-size: 80%; '>
+
Copyright 2000-2011 University of Southampton.
<span style='display:none'>User Comments</span>
+
 
 +
This file is part of EPrints http://www.eprints.org/.
 +
 
 +
EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 +
 
 +
EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
 +
 
 +
You should have received a copy of the GNU Lesser General Public License along with EPrints.  If not, see http://www.gnu.org/licenses/.
 +
 
 
<!-- Edit below this comment -->
 
<!-- Edit below this comment -->
  
  
 
<!-- Pod2Wiki= -->
 
<!-- Pod2Wiki= -->
</div>
+
<!-- Pod2Wiki=_postamble_ -->
<!-- Pod2Wiki=_postamble_ --><!-- Edit below this comment -->
+
<!-- Edit below this comment -->

Revision as of 09:57, 22 January 2013

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


API: Core API

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki


NAME

EPrints::DataObj::LoginTicket - user system loginticket


DESCRIPTION

Login tickets are the database entries for the user's session cookies.


Configuration Settings

  • user_cookie_timeout = undef
Set an expiry on the session cookies. This will cause the user's browser to delete the cookie after the given time. The time is specified according to CGI's cookie constructor. This allows settings like +1h and +7d.
  • user_inactivity_timeout = 86400 * 7
How long to wait in seconds before logging the user out after their last activity.
  • user_session_timeout = undef
How long in seconds the user can stay logged in before they must re-log in. Defaults to never - if you do specify this setting you probably want to reduce user_inactivity_timeout to <1 hour.


METHODS

get_system_field_info

$thing = EPrints::DataObj::Access->get_system_field_info

Core fields.


Class Methods

get_dataset_id

$dataset = EPrints::DataObj::LoginTicket->get_dataset_id

Returns the id of the EPrints::DataSet object to which this record belongs.


Object Methods

$ticket->set_cookies()

Set the session cookies for this login ticket.

$ticket->update()

Update the login ticket by increasing the expiry time.

The expiry time is increased user_inactivity_timeout or 7 days.


SEE ALSO

EPrints::DataObj and EPrints::DataSet.


COPYRIGHT

Copyright 2000-2011 University of Southampton.

This file is part of EPrints http://www.eprints.org/.

EPrints is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

EPrints is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with EPrints. If not, see http://www.gnu.org/licenses/.