{"id":30706895,"url":"https://github.com/uvasomit/shibboleth","last_synced_at":"2025-09-12T05:34:50.481Z","repository":{"id":42220615,"uuid":"171500592","full_name":"UVASOMIT/shibboleth","owner":"UVASOMIT","description":"JavaScript package for accessing authentication items from Shibboleth","archived":false,"fork":false,"pushed_at":"2025-08-06T21:05:58.000Z","size":128,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-02T20:42:35.445Z","etag":null,"topics":["authentication","shibboleth"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UVASOMIT.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-02-19T15:39:02.000Z","updated_at":"2025-03-26T16:37:43.000Z","dependencies_parsed_at":"2025-09-02T20:25:51.365Z","dependency_job_id":"48f6841e-c737-45ff-9027-6c6c97b04ab3","html_url":"https://github.com/UVASOMIT/shibboleth","commit_stats":null,"previous_names":["szul/shibboleth"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/UVASOMIT/shibboleth","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UVASOMIT%2Fshibboleth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UVASOMIT%2Fshibboleth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UVASOMIT%2Fshibboleth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UVASOMIT%2Fshibboleth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UVASOMIT","download_url":"https://codeload.github.com/UVASOMIT/shibboleth/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UVASOMIT%2Fshibboleth/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274759115,"owners_count":25343872,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-12T02:00:09.324Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["authentication","shibboleth"],"created_at":"2025-09-02T20:05:31.362Z","updated_at":"2025-09-12T05:34:50.455Z","avatar_url":"https://github.com/UVASOMIT.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shibboleth Node.JS Package\n\nJavaScript package for accessing authentication items from Shibboleth.\n\n## Installation\n\nTo install the package:\n\n    npm install @uvasomit/shibboleth --save\n\n## Usage (TypeScript)\n\n### Restify\n\nTo use this as Restify middleware:\n\n    const { shibboleth } = require('@uvasomit/shibboleth');\n\n    const app = express();\n    const server = new http.Server(app);\n\n    app.use(shibboleth);\n\nThe middleware will look to see if the `http_shibsessionid` header or the `x-iisnode-http_shibsessionid` header is present. If so, the middleware passes, and moves to the next middleware. If not, the middleware will look for an environment variable called `SHIBBOLETHURL`. This URL should be the login/authentication URL without the query string. It will append `?target=` to the end of it, and then redirect the user to the Shibboleth authentication URL with the target set to the currently requested page.\n\nWhen it returns the headers should be present, and the middleware will pass. To get the authenticated user, check your headers for the apprioriate item, such as `http_uid` or `logon_user`. This will depend on your setup.\n\nYou can also get the user via the user helper:\n\n    const { getUserAuth, shibboleth } = require('@uvasomit/shibboleth');\n\nYou can then call:\n\n    const userID = getUserAuth(req);\n\nThis accepts a Restify or Express request object, and by default will return one of the following (in this order):\n\n* `http_uid`\n* `http_pubcookie_user`\n* `logon_user`\n* `x-iisnode-http_uid`\n* `x-iisnode-http_pubcookie_user`\n* `x-iisnode-login_user`\n\nYou can also check explicitly for a different set of headers via:\n\n    const headers = ['header_to_check'];\n    const userID = getUserAuth(req, headers);\n\n### Manual Process\n\nIf you don't want to use the middleware, you can import the `Shibboleth` class:\n\n    const { Shibboleth } = require('@uvasomit/shibboleth');\n\n    const shib = new Shibboleth(process.env.SHIBBOLETHURL);\n\nOnce you have the class instantiated, you have access to several methods:\n\n* `shib.hasShibSessionInfo(req, headers)`\n\nIn the above `headers` is optional, and is a string array of Shibboleth session headers to look for in order to verify that the request has a Shibboleth session.\n\n* `shib.shouldRedirect(req)`\n* `shib.redirect(req, next)`\n\nIn the above, `next` is for Restify only, and is what is passed through via the `shibboleth()` middleware.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuvasomit%2Fshibboleth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuvasomit%2Fshibboleth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuvasomit%2Fshibboleth/lists"}