{"id":13617186,"url":"https://github.com/symfonycorp/connect","last_synced_at":"2026-01-15T22:17:55.123Z","repository":{"id":3524612,"uuid":"4583603","full_name":"symfonycorp/connect","owner":"symfonycorp","description":"The SymfonyConnect official API SDK","archived":false,"fork":false,"pushed_at":"2025-12-11T12:01:53.000Z","size":407,"stargazers_count":92,"open_issues_count":0,"forks_count":33,"subscribers_count":17,"default_branch":"master","last_synced_at":"2026-01-13T03:35:51.108Z","etag":null,"topics":["authentication","connect","oauth","php","sdk","symfony"],"latest_commit_sha":null,"homepage":"https://connect.symfony.com/","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/symfonycorp.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},"funding":{"tidelift":"packagist/symfonycorp/connect","custom":["https://symfony.com/cloud/","https://live.symfony.com/","https://insight.symfony.com/","https://certification.symfony.com/"]}},"created_at":"2012-06-07T09:45:25.000Z","updated_at":"2025-12-11T12:01:17.000Z","dependencies_parsed_at":"2022-09-06T04:21:59.839Z","dependency_job_id":"b91d44e4-e0c0-466c-ba9a-8195827583a8","html_url":"https://github.com/symfonycorp/connect","commit_stats":{"total_commits":184,"total_committers":30,"mean_commits":6.133333333333334,"dds":0.7228260869565217,"last_synced_commit":"32aef0256a7a9c940590782aead9572ca5af4b20"},"previous_names":["sensiolabs/connect"],"tags_count":78,"template":false,"template_full_name":null,"purl":"pkg:github/symfonycorp/connect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfonycorp%2Fconnect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfonycorp%2Fconnect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfonycorp%2Fconnect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfonycorp%2Fconnect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/symfonycorp","download_url":"https://codeload.github.com/symfonycorp/connect/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/symfonycorp%2Fconnect/sbom","scorecard":{"id":863071,"data":{"date":"2025-08-11","repo":{"name":"github.com/symfonycorp/connect","commit":"8d28a3c11365c58e333c26584ec5e322c5eb0df6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.1,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":9,"reason":"Found 14/15 approved changesets -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/symfonycorp/.github/SECURITY.md:1","Info: Found linked content: github.com/symfonycorp/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/symfonycorp/.github/SECURITY.md:1","Info: Found text in security policy: github.com/symfonycorp/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-24T01:56:13.610Z","repository_id":3524612,"created_at":"2025-08-24T01:56:13.610Z","updated_at":"2025-08-24T01:56:13.610Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28472625,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T22:13:38.078Z","status":"ssl_error","status_checked_at":"2026-01-15T22:12:11.737Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","connect","oauth","php","sdk","symfony"],"created_at":"2024-08-01T20:01:38.067Z","updated_at":"2026-01-15T22:17:55.108Z","avatar_url":"https://github.com/symfonycorp.png","language":"PHP","readme":"# SymfonyConnect SDK\n\n## About\n\nThis is the official SDK for the SymfonyConnect API. It works for the public\nAPI or with a registered OAuth application. To register an application, please\ngo to your [SymfonyConnect Account](https://connect.symfony.com).\n\n## Installation\n\nTo install the SDK, run the command below and you will get the latest version:\n\n```bash\ncomposer require symfonycorp/connect\n```\n\n## Usage\n\n### OAuth\n\nTo use the SDK in a Symfony application, we recommend using the\nbuilt-in bundle.\n\nOtherwise, you can take inspiration from the following part, which will\nshow you how to include OAuth authentication within a Silex App.\n\nWarning: We take for granted that you already have registered your app on\n[SymfonyConnect](https://connect.symfony.com) and that you're in\npossession of your `application_id`, `application_secret` and `scope`.\n\n1. Configure your silex app with the data we gave us at app registration.\n\n    ```php\n    // index.php\n    use SymfonyCorp\\Connect\\Api\\Api;\n    use SymfonyCorp\\Connect\\OAuthConsumer;\n    \n    $app = new Silex\\Application();\n    $app['connect_id'] = 'application_id';\n    $app-\u003eregister(new Silex\\Provider\\UrlGeneratorServiceProvider());\n    $app-\u003eregister(new Silex\\Provider\\SessionServiceProvider());\n    \n    $app['connect_secret'] = 'application_secret';\n    // List of scope copy-pasted from your application page on SymfonyConnect\n    $app['connect_scope'] = array(\n        'SCOPE_ADDITIONAL_EMAILS',\n        'SCOPE_BIRTHDAY',\n        'SCOPE_EMAIL',\n        'SCOPE_LOCATION',\n        'SCOPE_PUBLIC',\n        'SCOPE_SSH_KEYS',\n    );\n    \n    $app['connect_consumer'] = new OAuthConsumer(\n        $app['connect_id'],\n        $app['connect_secret'],\n        implode(' ', $app['connect_scope']) // scope MUST be space separated\n    );\n    $app['connect_api'] = new Api();\n    ```\n\n    This done. We can now move on to the second step.\n\n2. We need to create two controllers to handle the OAuth2 Three-Legged workflow.\n\n   The first controller goal is to redirect the user to SymfonyConnect in\n   order to ask him for the authorization that your app will use his data. This\n   controller will be bound to the `connect_auth` route. In your template,\n   you'll need to create a link to this route.\n\n    ```php\n    // index.php\n    $app-\u003eget('/connect/new', function () use ($app) {\n        $callback = $app['url_generator']-\u003egenerate('connect_callback', array(), true);\n        $url = $app['connect_consumer']-\u003egetAuthorizationUri($callback);\n\n        return $app-\u003eredirect($url);\n    })-\u003ebind('connect_auth');\n    ```\n\n    The second controller is the one that will welcome the user after\n    SymfonyConnect redirected him to your application. When registering your\n    client, you'll have to provide the exact absolute URL that points to this\n    controller.\n\n    ```php\n    $app-\u003eget('/connect/callback', function (Request $request) use ($app) {\n        // There was an error during the workflow.\n        if ($request-\u003eget('error')) {\n            throw new \\RuntimeException($request-\u003eget('error_description'));\n        }\n\n        // Everything went fine, you can now request an access token.\n        try {\n            $data = $app['connect_consumer']-\u003erequestAccessToken($app['url_generator']-\u003egenerate('connect_callback', array(), true), $request-\u003eget('code'));\n        } catch (OAuthException $e) {\n            throw $e;\n        }\n\n        // At this point, we have an access token and we can use the SDK to request the API\n        $app['connect_api']-\u003esetAccessToken($data['access_token']); // All further request will be done with this access token\n        $root = $app['connect_api']-\u003egetRoot();\n        $user = $root-\u003egetCurrentUser();\n        $user-\u003egetBadges()-\u003erefresh();\n\n        $app['session']-\u003estart();\n        $app['session']-\u003eset('connect_access_token', $data['access_token']);\n        $app['session']-\u003eset('connect_user', $user);\n\n        return $app-\u003eredirect('/');\n    })-\u003ebind('connect_callback');\n    ```\n\n3. Create a link from your template\n\n   In a template, you can use the following snippet of code to render a\n   SymfonyConnect button:\n\n    ```html\n    \u003ca href=\"#\" class=\"connect-with-symfony\"\u003e\n        \u003cspan\u003eLog in with SymfonyConnect\u003c/span\u003e\n    \u003c/a\u003e\n    ```\n\n   And include the following CSS file: `https://connect.symfony.com/css/sln.css`\n\nEt voilà! Your application can now use SymfonyConnect as an authentication\nmethod!\n\n### The API\n\nThe SymfonyConnect Connect API is RESTFul and (tries to) conforms to the HATEOAS\nprinciple.\n\nHere are some useful recipes.\n\n1. Search\n\n    ```php\n    $root = $api-\u003egetRoot();\n\n    // Will search for users\n    $users = $root-\u003egetUsers('fab');\n    ```\n\n2. Edit authenticated user\n\n    ```php\n    $app['connect_api']-\u003esetAccessToken($app['session']-\u003eget('connect_access_token'));\n    $root = $app['connect_api']-\u003egetRoot();\n    $user = $root-\u003egetCurrentUser();\n    $user-\u003esetBiography(\"I'm sexy and I know it.\");\n    $user-\u003esubmitForm();\n    ```\n\nAs you can see by these examples, you always have to to go through the API Root\nto make an action. This is because the API is discoverable and that the SDK\nshould not know anything beside the API's entry point.\n\n## License\n\nThis library is licensed under the MIT license.\n","funding_links":["https://tidelift.com/funding/github/packagist/symfonycorp/connect","https://symfony.com/cloud/","https://live.symfony.com/","https://insight.symfony.com/","https://certification.symfony.com/"],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymfonycorp%2Fconnect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsymfonycorp%2Fconnect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsymfonycorp%2Fconnect/lists"}