{"id":22059245,"url":"https://github.com/opentable/hapi-auth-fake","last_synced_at":"2026-05-06T05:34:37.897Z","repository":{"id":57260778,"uuid":"41747627","full_name":"opentable/hapi-auth-fake","owner":"opentable","description":"will always auth, useful when developing","archived":false,"fork":false,"pushed_at":"2018-02-23T16:31:25.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-03-02T16:18:35.979Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/opentable.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}},"created_at":"2015-09-01T15:40:55.000Z","updated_at":"2019-04-11T17:11:02.000Z","dependencies_parsed_at":"2022-08-25T02:11:59.047Z","dependency_job_id":null,"html_url":"https://github.com/opentable/hapi-auth-fake","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentable%2Fhapi-auth-fake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentable%2Fhapi-auth-fake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentable%2Fhapi-auth-fake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opentable%2Fhapi-auth-fake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opentable","download_url":"https://codeload.github.com/opentable/hapi-auth-fake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245136405,"owners_count":20566588,"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","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":[],"created_at":"2024-11-30T17:27:42.283Z","updated_at":"2026-05-06T05:34:37.839Z","avatar_url":"https://github.com/opentable.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hapi-auth-fake\nwill always auth, useful when developing\n\nthe only option you need to supply is a data function, this returns the credentials you want to be returned on auth.\n\n##example\n\n```javascript\nvar Hapi = require('hapi');\n\nvar home = function (request, reply) {\n\n    reply('\u003chtml\u003e\u003chead\u003e\u003ctitle\u003eLogin page\u003c/title\u003e\u003c/head\u003e\u003cbody\u003e\u003ch3\u003eWelcome '\n      + request.auth.credentials.name\n      + '!\u003c/h3\u003e\u003cbr/\u003e\u003c/body\u003e\u003c/html\u003e');\n};\n\nvar server = new Hapi.Server();\nserver.connection({ port: 8000 });\n\nserver.register(require('hapi-auth-fake'), function (err) {\n\n    server.auth.strategy('session', 'fake', {\n        dataFunc: function() {\n            return { name: 'bob' }\n        }\n    });\n});\n\nserver.route([\n    {\n        method: 'GET',\n        path: '/',\n        config: {\n            handler: home,\n            auth: 'session'\n        }\n    }\n]);\n\nserver.start(function (err) {\n\n    if (err) {\n        throw err;\n    }\n    console.log('Server started at: ' + server.info.uri);\n});\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentable%2Fhapi-auth-fake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopentable%2Fhapi-auth-fake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopentable%2Fhapi-auth-fake/lists"}