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

From EPrints Documentation
Jump to: navigation, search
(New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...)
 
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<!-- Pod2Wiki=_preamble_  
 
<!-- Pod2Wiki=_preamble_  
This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost.
+
This page has been automatically generated from the EPrints 3.4 source. Any wiki changes made between the 'Pod2Wiki=*' and 'Edit below this comment' comments will be lost.
  -->{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj/LoginTicket.pm|package_name=EPrints::DataObj::LoginTicket}}[[Category:API|LoginTicket]]<!-- End of Pod2Wiki -->
+
  -->{{API}}{{Pod2Wiki}}{{API:Source|file=EPrints/DataObj/LoginTicket.pm|package_name=EPrints::DataObj::LoginTicket}}[[Category:API|LOGINTICKET]][[Category:API:EPrints/DataObj|LOGINTICKET]]<div><!-- Edit below this comment -->
<!-- Pod2Wiki=head_name -->=NAME=
 
'''EPrints::DataObj::LoginTicket''' - user system loginticket
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_description -->=DESCRIPTION=
 
This is an internal class that shouldn't be used outside [[API:EPrints/Database|EPrints::Database]].
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=_private_ --><!-- Pod2Wiki=head_name -->
<!-- Pod2Wiki=head_methods -->=METHODS=
+
==NAME==
<!-- End of Pod2Wiki -->
+
'''EPrints::DataObj::LoginTicket''' - User system login ticket.
<!-- Pod2Wiki=item_get_system_field_info -->==get_system_field_info==
 
  
  $thing = EPrints::DataObj::Access-&gt;get_system_field_info
+
<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 -->
  
Core fields.
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=head_constructor_methods -->==Constructor Methods==
+
</div>
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki=head_description -->
<!-- Pod2Wiki=item_new -->===new===
+
==DESCRIPTION==
 +
Login tickets are the database entries for a user's session cookies.
  
  $thing = EPrints::DataObj::LoginTicket-&gt;new( $session, $id )
+
<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 -->
  
The data object identified by $id.
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_new_from_data -->===new_from_data===
+
</div>
 +
<!-- Pod2Wiki=head_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%; '>
 +
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
  
  $thing = EPrints::DataObj::LoginTicket-&gt;new_from_data( $session, $known )
 
  
A new <tt>EPrints::DataObj::LoginTicket</tt> object containing data $known (a hash reference).
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_user_cookie_timeout_undef -->
 +
====user_cookie_timeout = undef====
  
<!-- End of Pod2Wiki -->
+
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>.
<!-- Pod2Wiki=head_class_methods -->==Class Methods==
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_remove_all -->===remove_all===
 
  
  EPrints::DataObj::LoginTicket::remove_all( $session )
+
<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 -->
  
Remove all records from the loginticket dataset.
 
  
<!-- End of Pod2Wiki -->
+
<!-- Pod2Wiki= -->
<!-- Pod2Wiki=item_get_defaults -->===get_defaults===
+
</div>
 +
<!-- Pod2Wiki=item_user_inactivity_timeout_86400_7 -->
 +
====user_inactivity_timeout = 86400 * 7====
  
  $defaults = EPrints::DataObj::LoginTicket-&gt;get_defaults( $session, $data )
+
How long to wait in seconds before logging the user out after their  last activity.
  
Return default values for this object based on the starting data.
+
<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 -->
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_object_methods -->==Object Methods==
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_remove -->===remove===
 
  
  $foo = $thing-&gt;remove()
+
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_user_session_timeout_undef -->
 +
====user_session_timeout = undef====
  
Remove this record from the data set (see [[API:EPrints/Database|EPrints::Database]]).
+
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 <tt>user_inactivity_timeout</tt> to &lt;1 hour.
  
<!-- End of Pod2Wiki -->
+
<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_see_also -->=SEE ALSO=
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_core_metadata_fields -->
 +
==CORE METADATA 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 -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_code -->
 +
===code (id)===
 +
 
 +
The identifier used in the HTTP cookie for this login ticket's  session.
 +
 
 +
<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_securecode -->
 +
===securecode (id)===
 +
 
 +
The identifier used in the HTTPS cookie for this login ticket's  session.
 +
 
 +
<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_ip -->
 +
===ip (id)===
 +
 
 +
The IP address of associated with 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_time -->
 +
===time (bigint)===
 +
 
 +
The time in seconds since the start of epoch when this login  ticket was created.
 +
 
 +
<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_expires -->
 +
===expires (bigint)===
 +
 
 +
The time in seconds since the start of epoch when this login ticket will expires.
 +
 
 +
<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_references_and_related_objects -->
 +
==REFERENCES AND RELATED OBJECTS==
 +
<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_userid -->
 +
===userid (itemref)===
 +
 
 +
The ID of the user to whom this login ticket 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 -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_instance_variables -->
 +
==INSTANCE VARIABLES==
 +
See [[API:EPrints/DataObj#INSTANCE_VARIABLES|EPrints::DataObj]].
 +
 
 +
<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 -->
 +
==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=head_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 -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_get_system_field_info -->
 +
====get_system_field_info====
 +
 
 +
$fields = EPrints::DataObj::Access-&gt;get_system_field_info
 +
Returns an array describing the system metadata of the loginticket 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 -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_get_dataset_id -->
 +
====get_dataset_id====
 +
 
 +
$dataset = EPrints::DataObj::LoginTicket-&gt;get_dataset_id
 +
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 -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=item_get_defaults -->
 +
====get_defaults====
 +
 
 +
$defaults = EPrints::DataObj::LoginTicket-&gt;get_defaults( $session, $data, $dataset )
 +
Returns default values for this data object based on the starting <tt>$data</tt>.
 +
 
 +
<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_new_from_request -->
 +
====new_from_request====
 +
 
 +
$loginticket = EPrints::DataObj::LoginTicket-&gt;new_from_request( $repo, $r )
 +
Creates a new loginticket data object using the {{API:PodLink|file=HTTP/Request|package_name=HTTP::Request|section=|text=HTTP::Request}}  <tt>$r</tt>.
 +
 
 +
Returns new loginticket data object if successful. Otherwise, returns <tt>undef</tt>.
 +
 
 +
<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_expire_all -->
 +
====expire_all====
 +
 
 +
EPrints::DataObj::LoginTicket-&gt;expire_all( $repo )
 +
Expire all login tickets. Effectively logging out all users currently logged in.
 +
 
 +
<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_session_key -->
 +
====session_key====
 +
 
 +
EPrints::DataObj::LoginTicket-&gt;session_key( $repo )
 +
Get the key to use for the session cookies.
 +
 
 +
In the following circumstance:
 +
 
 +
  example.org
 +
  custom.example.org
 +
 
 +
Where both hosts use the same cookie key the cookie from example.org  will collide with the cookie from custom.example.org. To avoid this  the full hostname is embedded in the cookie key.
 +
 
 +
<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_secure_session_key -->
 +
====secure_session_key====
 +
 
 +
EPrints::DataObj::LoginTicket-&gt;secure_session_key($repo)
 +
See [[API:EPrints/DataObj/LoginTicket#session_key|session_key]].
 +
 
 +
<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_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_generate_cookie -->
 +
====generate_cookie====
 +
 
 +
$cookie = $loginticket-&gt;generate_cookie( %opts )
 +
Returns the HTTP (non-secure) session cookie. Uses <tt>%opts</tt> to add any additional attributes to the cookie.
 +
 
 +
<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_generate_secure_cookie -->
 +
====generate_secure_cookie====
 +
 
 +
$cookie = $ticket-&gt;generate_secure_cookie( %opts )
 +
Returns the HTTPS session cookie. Uses <tt>%opts</tt> to add any additional  attributes to the cookie.
 +
 
 +
<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
 +
Set the session cookies for this loginticket data object.
 +
 
 +
<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
 +
Update the loginticket data object by extending the expiry time.
 +
 
 +
The expiry time is extended <tt>user_inactivity_timeout</tt> 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 -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_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]].
  
<!-- End of Pod2Wiki -->
+
<div style='background-color: #e8e8f; margin: 0.5em 0em 1em 0em; border: solid 1px #cce;  padding: 0em 1em 0em 1em; font-size: 80%; '>
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
+
<span style='display:none'>User Comments</span>
 +
<!-- Edit below this comment -->
 +
 
 +
 
 +
<!-- Pod2Wiki= -->
 +
</div>
 +
<!-- Pod2Wiki=head_copyright -->
 +
==COPYRIGHT==
 +
{{API:Copyright}}
 +
<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=_postamble_ --><!-- Edit below this comment -->

Latest revision as of 17:10, 10 January 2022

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 login ticket.

User Comments


DESCRIPTION

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

User Comments


Configuration Settings

User Comments


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 Comments


user_inactivity_timeout = 86400 * 7

How long to wait in seconds before logging the user out after their last activity.

User Comments


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.

User Comments


CORE METADATA FIELDS

User Comments


code (id)

The identifier used in the HTTP cookie for this login ticket's session.

User Comments


securecode (id)

The identifier used in the HTTPS cookie for this login ticket's session.

User Comments


ip (id)

The IP address of associated with this login ticket.

User Comments


time (bigint)

The time in seconds since the start of epoch when this login ticket was created.

User Comments


expires (bigint)

The time in seconds since the start of epoch when this login ticket will expires.

User Comments


REFERENCES AND RELATED OBJECTS

User Comments


userid (itemref)

The ID of the user to whom this login ticket belongs.

User Comments


INSTANCE VARIABLES

See EPrints::DataObj.

User Comments


METHODS

User Comments


Class Methods

User Comments


get_system_field_info

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

Returns an array describing the system metadata of the loginticket dataset.

User Comments


get_dataset_id

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

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

User Comments


get_defaults

$defaults = EPrints::DataObj::LoginTicket->get_defaults( $session, $data, $dataset )

Returns default values for this data object based on the starting $data.

User Comments


new_from_request

$loginticket = EPrints::DataObj::LoginTicket->new_from_request( $repo, $r )

Creates a new loginticket data object using the HTTP::Request $r.

Returns new loginticket data object if successful. Otherwise, returns undef.

User Comments


expire_all

EPrints::DataObj::LoginTicket->expire_all( $repo )

Expire all login tickets. Effectively logging out all users currently logged in.

User Comments


session_key

EPrints::DataObj::LoginTicket->session_key( $repo )

Get the key to use for the session cookies.

In the following circumstance:

 example.org
 custom.example.org
 

Where both hosts use the same cookie key the cookie from example.org will collide with the cookie from custom.example.org. To avoid this the full hostname is embedded in the cookie key.

User Comments


secure_session_key

EPrints::DataObj::LoginTicket->secure_session_key($repo)

See session_key.

User Comments


Object Methods

User Comments


generate_cookie

$cookie = $loginticket->generate_cookie( %opts )

Returns the HTTP (non-secure) session cookie. Uses %opts to add any additional attributes to the cookie.

User Comments


generate_secure_cookie

$cookie = $ticket->generate_secure_cookie( %opts )

Returns the HTTPS session cookie. Uses %opts to add any additional attributes to the cookie.

User Comments


set_cookies

$ticket->set_cookies

Set the session cookies for this loginticket data object.

User Comments


update

$ticket->update

Update the loginticket data object by extending the expiry time.

The expiry time is extended user_inactivity_timeout or 7 days.

User Comments


SEE ALSO

EPrints::DataObj and EPrints::DataSet.

User Comments


COPYRIGHT

© Copyright 2023 University of Southampton.

EPrints 3.4 is supplied by EPrints Services.

http://www.eprints.org/eprints-3.4/

LICENSE

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

EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.

EPrints 3.4 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 3.4. If not, see http://www.gnu.org/licenses/.

User Comments