Automatic Login

By wrapping a HathiTrust URL or item handle with a single sign-on URL, it is possible to construct a link to a HathiTrust web page or to a work in the collection that automatically passes users from HathiTrust partner institutions through their institution’s authentication service, effectively “automatically” logging them into HathiTrust.

URLs must be constructed in the following way:

  • Links to digital items: http://hdl.handle.net/2027/$ID?urlappend=%3Bsignon=swle:$ENTITY_ID
  • Links to the home page: https://www.hathitrust.org/?signon=swle:$ENTITY_ID
  • Links to catalog records: https://catalog.hathitrust.org/Record/$RECORD_ID?signon=swle:ENTITY_ID

Where $ID is the HathiTrust item ID (for example mdp.39015015394847), $RECORD_ID is the catalog record ID (for example 007685144), and $ENTITY_ID is your SAML identity provider (IdP) entity ID. The same method will work regardless of identity provider and federation.

Examples

Given the permanent handle url for an item

http://hdl.handle.net/2027/mdp.39015015394847

…and the SAML entity ID for University of Michigan’s IdP

https://shibboleth.umich.edu/idp/shibboleth

…you can append the “signon” parameter to automatically pass users through your institution’s SAML IDP:

http://hdl.handle.net/2027/mdp.39015015394847?urlappend=%3Bsignon=swle:https://shibboleth.umich.edu/idp/shibboleth

Given the HathiTrust homepage and the SAML IdP entity ID for University of Minnesota:

https://www.hathitrust.org/?signon=swle:urn:mace:incommon:umn.edu

 

Given a catalog record url and the SAML IdP entity ID for Cornell University: 

https://catalog.hathitrust.org/Record/007685144?signon=swle:https://shibidp.cit.cornell.edu/idp/shibboleth

Websites serving multiple organizations

If you are managing a catalog or website that serves users from multiple campuses or organizations, the above structure won’t work because it only allows you to list one entity ID in the syntax. Instead, you can set up automatic login links that direct your users to our login screen first, where they have to select their organization from the dropdown list under “Find your partner institution.”

URLs must be constructed in the following way:

  • Links to digital items: http://hdl.handle.net/2027/$ID?urlappend=%3Bsignon=swle:wayf
  • Link to the home page: https://www.hathitrust.org/?signon=swle:wayf
  • Links to catalog records: https://catalog.hathitrust.org/Record/$RECORD_ID?signon=swle:wayf

Tip

Some institutions may have multiple identity providers or methods of logging in to external resources, so it is important to verify the entity ID your institution uses to log in to HathiTrust. The most reliable way of determining that is to:

This method will work regardless of federation or identity provider software.

Please contact support@hathitrust.org with any questions or comments.

Top
https://www.hathitrust.org/member-libraries/resources-for-librarians/improve-discovery/auto-login/
www.hathitrust.org
CC-MAIN-2023-50
9485
application/http; msgtype=response
sha1:URCZOQFUXGUZHLGSKE5DMWADHBDZQ5FG
<urn:uuid:45f6eda9-2cb2-4853-951d-b192b7012722>
2023-12-11T10:05:07Z
141.213.128.184
text/html
sha1:MA7SSUIMRBSHDG2P2FXNLGNENV3PYFBF
<urn:uuid:59281a28-6cd4-4f69-a20e-2ab384ddef07>
https://www.hathitrust.org/member-libraries/resources-for-librarians/improve-discovery/auto-login/
response
<urn:uuid:f5eda6be-712f-472d-ab35-e4664aa29ca2>
isPartOf: CC-MAIN-2023-50
publisher: Common Crawl
description: Wide crawl of the web for November/December 2023
operator: Common Crawl Admin (info@commoncrawl.org)
hostname: ip-10-67-67-56
software: Apache Nutch 1.19 (modified, https://github.com/commoncrawl/nutch/)
robots: checked via crawler-commons 1.5-SNAPSHOT (https://github.com/crawler-commons/crawler-commons)
format: WARC File Format 1.1
conformsTo: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/