<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div style="padding-bottom: 10px; padding-top: 5px;">
<div style="padding:12px; border:1px solid #8D3970; background-color:#F7F9FA; color:#8D3970; font-size:14px; line-height:22px; font-family: Calibri, Arial, Helvetica, sans-serif;">
<strong>CAUTION:</strong> This e-mail originated outside the University of Southampton.
</div>
</div>
<div>
<div dir="ltr">Update for anybody curious...<br>
<br>
Move the cgi script into the &quot;../cgi/users&quot; folder. Then adapt your url to reflect this.
<div><br>
</div>
<div>I'm not sure how good or correct this method is, but it works and I'm very happy with it.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>James</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Jan 25, 2021 at 8:36 PM James Kerwin via Eprints-tech &lt;<a href="mailto:eprints-tech@ecs.soton.ac.uk">eprints-tech@ecs.soton.ac.uk</a>&gt; wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div style="padding-bottom:10px;padding-top:5px">
<div style="padding:12px;border:1px solid rgb(141,57,112);background-color:rgb(247,249,250);color:rgb(141,57,112);font-size:14px;line-height:22px;font-family:Calibri,Arial,Helvetica,sans-serif">
<strong>CAUTION:</strong> This e-mail originated outside the University of Southampton.
</div>
</div>
<div>
<div dir="ltr">Evening (for me anyway) all,
<div><br>
</div>
<div>An update and updated question.</div>
<div><br>
</div>
<div>I ended up completing this using a cgi script and some clever &quot;tricks&quot; to keep the access token viable. Is it any easier to make the CGI pages log-in only or is that in fact harder than a static page?</div>
<div><br>
</div>
<div>I've only just finished the bulk of the task after getting stuck on a problem where my server wouldn't talk to the other server that was solved using:</div>
<div><br>
</div>
<div>'SSL_version' =&gt; 'TLSv1_2' with&nbsp;LWP::UserAgent.<br>
</div>
<div><br>
</div>
<div>I'm going to look at David and Johns suggestions in relation to log-in protected static pages. Any similar advice for cgi pages would be&nbsp;appreciated.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>James</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Jan 25, 2021 at 11:08 AM James Kerwin via Eprints-tech &lt;<a href="mailto:eprints-tech@ecs.soton.ac.uk" target="_blank">eprints-tech@ecs.soton.ac.uk</a>&gt; wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div style="padding-bottom:10px;padding-top:5px">
<div style="padding:12px;border:1px solid rgb(141,57,112);background-color:rgb(247,249,250);color:rgb(141,57,112);font-size:14px;line-height:22px;font-family:Calibri,Arial,Helvetica,sans-serif">
<strong>CAUTION:</strong> This e-mail originated outside the University of Southampton.
</div>
</div>
<div>
<div dir="ltr">Hi David and John,
<div><br>
</div>
<div>Thank you both for this. I've got plenty to go on now. It's not quite the easy &quot;if logged on... else...&quot; I had hoped for, but I didn't have high hopes for that route to start with.</div>
<div><br>
</div>
<div>I think for now I'll get it working in a very basic way and follow through with your suggestions later today or this evening. I'm currently at the stage where I have the data and can refresh the access token in a bit of an awkward way so I just need to
 print it to a screen.</div>
<div><br>
</div>
<div>Basically there's a LibCal screen we want some contractors to see, but we &quot;can't&quot; give them a login so need to extract the data and display it somewhere&nbsp;where they can get a log in/see it. Somehow it's fallen to me as the &quot;computer person&quot; in the library.</div>
<div><br>
</div>
<div>Thanks for the advice and guidance!</div>
<div>James</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, Jan 25, 2021 at 9:57 AM John Salter &lt;<a href="mailto:J.Salter@leeds.ac.uk" target="_blank">J.Salter@leeds.ac.uk</a>&gt; wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi James,<br>
By default I don't think there is a way (can't recall seeing this) - but here's some possible options:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
- write a simple cgi script in ~/archives/ARCHIVEID/cgi/users/ and use a phrase to display the page</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
- write a cgi script that calls a screen plugin that checks for a user using normal screen methods</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
- create a folder e.g. ~/archives/ARCHIVEID/cfg/lang/en/static/users/ and create a URL rewrite trigger that matches that path. The trigger would return 'OK' if there is a user present, or 'AUTH_REQUIRED' (401) if not.<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Some are less 'xpage'y - so if the plan was that someone else has editorial rights over the content of that page, the last one would probably be best.<br>
I think the middle one is the most EPrints-y, and the first is most hacky...</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Does any of that help?<br>
Cheers,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
John</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
</div>
<div id="gmail-m_-5990065585381683843gmail-m_8169784250563599719gmail-m_-4471732765840750915appendonsend">
</div>
<hr style="display:inline-block;width:98%">
<div id="gmail-m_-5990065585381683843gmail-m_8169784250563599719gmail-m_-4471732765840750915divRplyFwdMsg" dir="ltr">
<font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b>
<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk" target="_blank">eprints-tech-bounces@ecs.soton.ac.uk</a> &lt;<a href="mailto:eprints-tech-bounces@ecs.soton.ac.uk" target="_blank">eprints-tech-bounces@ecs.soton.ac.uk</a>&gt; on behalf of James Kerwin via Eprints-tech
 &lt;<a href="mailto:eprints-tech@ecs.soton.ac.uk" target="_blank">eprints-tech@ecs.soton.ac.uk</a>&gt;<br>
<b>Sent:</b> 25 January 2021 09:17<br>
<b>To:</b> <a href="mailto:eprints-tech@ecs.soton.ac.uk" target="_blank">eprints-tech@ecs.soton.ac.uk</a> &lt;<a href="mailto:eprints-tech@ecs.soton.ac.uk" target="_blank">eprints-tech@ecs.soton.ac.uk</a>&gt;<br>
<b>Subject:</b> [EP-tech] Static Page - Log In</font>
<div>&nbsp;</div>
</div>
<div>
<div style="padding-bottom:10px;padding-top:5px">
<div style="padding:12px;border:1px solid rgb(141,57,112);background-color:rgb(247,249,250);color:rgb(141,57,112);font-size:14px;line-height:22px;font-family:Calibri,Arial,Helvetica,sans-serif">
<strong>CAUTION:</strong> This e-mail originated outside the University of Southampton.
</div>
</div>
<div>
<div dir="ltr">Hi All,<br>
<div><br>
</div>
<div>Hope we're all happy and healthy.</div>
<div><br>
</div>
<div>I've been given a task and one option to complete it is to display information on a static page in EPrints. Due to the potentially sensitive nature of the data I was wondering if it's possible to have a static page in EPrints that requires the user to
 be logged in to EPrints to see it?</div>
<div><br>
</div>
<div>I've had a quick look around and looked at all my &quot;.xpage&quot; files and I have no examples. I feel like it isn't possible, but thought it would be best to ask.</div>
<div><br>
</div>
<div>If it isn't possible I have some other approaches&nbsp;to take. They will just take longer and my brain is already a bit scrambled after working out the LibCal API.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>James</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
*** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" rel="noreferrer" target="_blank">
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br>
*** Archive: <a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C82917eb2e50941bb525d08d8c17a0a21%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637472077186765921%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=X4Rpl3tJluVOajKcIWudkSYSqBfSj5b8W5DmC11OGNw%3D&amp;reserved=0" originalSrc="http://www.eprints.org/tech.php/" shash="bIji9mTKTZul05WhDi8Gs7Aq5RderdJadKa8iDdMXG7djjQWhY+iWUaPTBe6XZktZN9SVIaxbPeJ34GpJtak5OTrojUw6d9ZP419jc+3gFip62gkmKUtDrozEmWIcnfJRPIlqGhZw5kO1C4Z4ZviL0B6+vA1+3lVNc3KpgTn5kk=" rel="noreferrer" target="_blank">
http://www.eprints.org/tech.php/</a><br>
*** EPrints community wiki: <a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C82917eb2e50941bb525d08d8c17a0a21%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637472077186765921%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=yXljXMrarr5it0qvRuvSvUbDgab%2BcbQiv5qONwruRJ4%3D&amp;reserved=0" originalSrc="http://wiki.eprints.org/" shash="Qb1VarQJbBBOldihX7LMc0hPAsaE3O4xxGVn6FUXq7hJZ3UIpRlYuIFsUseQpQYDR6pWj5PkAKy2Jip3CvCJo9boztmbfioQc1/5fBW5RVnAiPYncjM+/9vnTwqV4wf7Cr3PbtLqporyf/D71B/a5w2dB38PjQkHhoAxA9ToHSM=" rel="noreferrer" target="_blank">
http://wiki.eprints.org/</a></blockquote>
</div>
</div>
</div>
*** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech" rel="noreferrer" target="_blank">
http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br>
*** Archive: <a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C82917eb2e50941bb525d08d8c17a0a21%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637472077186775915%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=onncDQxKOPJ3kFloC%2BqbnFORNjObFUHmmUMwUydezwE%3D&amp;reserved=0" originalSrc="http://www.eprints.org/tech.php/" shash="jbaYVSQr76YpN9W9omRt2aaiVcSMcj7J9oBFixVLqripUrYRGvBMHW/uosAr465LaM4O8iqeBWc5HUyH6gstJzX4/JHM/rTuVfHMzsqnOSlH7HtF7gNkQIwSzuiyY1aH1BYKOEYLYSIrZUbrATkOcCOxeIyRqHOgiELa+TgXRMA=" rel="noreferrer" target="_blank">
http://www.eprints.org/tech.php/</a><br>
*** EPrints community wiki: <a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C82917eb2e50941bb525d08d8c17a0a21%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637472077186775915%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=7NmGdOSeNm1xbUEQxKtWMKuWzXC0vFRbwAFxpCT9qDA%3D&amp;reserved=0" originalSrc="http://wiki.eprints.org/" shash="YmFxfZiKWnaEyS6FiK/ul3Gep2W56Df9P05zzh7KPOjh/LU1hDWY9q8Ot7egAjMheu8/+7N3Wd7NDBRiAPp6KZjH+osk+sLM37UXEida8MfTz1//BpZBL5jLr5j7sD31fQD+OMDs949Rauum2Vwwna309YzVYvCJEjCTufn38UE=" rel="noreferrer" target="_blank">
http://wiki.eprints.org/</a></blockquote>
</div>
</div>
</body>
</html>