{"id":18996047,"url":"https://github.com/00f100/fcphp-shttp","last_synced_at":"2025-10-30T18:43:54.957Z","repository":{"id":56894003,"uuid":"139216525","full_name":"00F100/fcphp-shttp","owner":"00F100","description":"Package to security http requests","archived":false,"fork":false,"pushed_at":"2018-08-04T19:33:03.000Z","size":21,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-17T03:08:50.748Z","etag":null,"topics":["fcphp","php7","shttp"],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/00F100.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":"2018-06-30T03:38:07.000Z","updated_at":"2020-11-12T17:32:16.000Z","dependencies_parsed_at":"2022-08-21T01:20:14.774Z","dependency_job_id":null,"html_url":"https://github.com/00F100/fcphp-shttp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Ffcphp-shttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Ffcphp-shttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Ffcphp-shttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/00F100%2Ffcphp-shttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/00F100","download_url":"https://codeload.github.com/00F100/fcphp-shttp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250252119,"owners_count":21399941,"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":["fcphp","php7","shttp"],"created_at":"2024-11-08T17:33:46.114Z","updated_at":"2025-10-30T18:43:49.914Z","avatar_url":"https://github.com/00F100.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FcPhp Security HTTP\n\nLibrary to manipulate auth of user into HTTP env\n\n[![Build Status](https://travis-ci.org/00F100/fcphp-shttp.svg?branch=master)](https://travis-ci.org/00F100/fcphp-shttp) [![codecov](https://codecov.io/gh/00F100/fcphp-shttp/branch/master/graph/badge.svg)](https://codecov.io/gh/00F100/fcphp-shttp) [![Total Downloads](https://poser.pugx.org/00F100/fcphp-shttp/downloads)](https://packagist.org/packages/00F100/fcphp-shttp)\n\n## How to install\n\nComposer:\n```sh\n$ composer require 00f100/fcphp-shttp\n```\n\nor add in composer.json\n```json\n{\n    \"require\": {\n        \"00f100/fcphp-shttp\": \"*\"\n    }\n}\n```\n\n## How to use\n\n```php\n\u003c?php\n\nuse FcPhp\\SHttp\\SHttp;\nuse FcPhp\\SHttp\\SEntity;\nuse FcPhp\\Session\\Facades\\SessionFacade;\n\n$session = SessionFacade::getInstance($_COOKIE);\n$entity = new SEntity();\n\n$instance = new SHttp($_POST, $_SERVER, $entity, $session);\n\n$instance-\u003ecallback('authHeaderCallback', function(ISEntity $entity, $authHeader) {\n    $entity-\u003esetName('Header Auth');\n    return $entity;\n});\n\n$instance-\u003ecallback('authSessionCallback', function(ISEntity $entity, $authSession) {\n    $entity-\u003esetName('Session Auth');\n    return $entity;\n});\n\n$instance-\u003ecallback('authUserPassCallback', function(ISEntity $entity, $authUserPass) {\n    $entity-\u003esetName('User Pass Auth');\n    return $entity;\n});\n\n$entity = $instance-\u003eget();\n\n// PRINT:\n// IF HEADER AUTH: Header Auth\n// IF SESSION AUTH: Session Auth\n// IF POST AUTH: User Pass Auth\necho $entity-\u003egetName();\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F00f100%2Ffcphp-shttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F00f100%2Ffcphp-shttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F00f100%2Ffcphp-shttp/lists"}