{"id":40382873,"url":"https://github.com/rciam/simple-oidc-client-php","last_synced_at":"2026-01-20T12:04:29.292Z","repository":{"id":31388749,"uuid":"127723218","full_name":"rciam/simple-oidc-client-php","owner":"rciam","description":"A simple OpenID Connect (OIDC) client for browser-based applications in PHP","archived":false,"fork":false,"pushed_at":"2023-11-07T08:48:42.000Z","size":70,"stargazers_count":0,"open_issues_count":3,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-11-07T09:36:57.396Z","etag":null,"topics":["oidc","oidc-client","openidconnect","openidconnect-client","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rciam.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2018-04-02T07:49:07.000Z","updated_at":"2023-04-19T23:45:16.000Z","dependencies_parsed_at":"2023-11-07T09:45:50.625Z","dependency_job_id":null,"html_url":"https://github.com/rciam/simple-oidc-client-php","commit_stats":null,"previous_names":[],"tags_count":8,"template":null,"template_full_name":null,"purl":"pkg:github/rciam/simple-oidc-client-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rciam%2Fsimple-oidc-client-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rciam%2Fsimple-oidc-client-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rciam%2Fsimple-oidc-client-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rciam%2Fsimple-oidc-client-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rciam","download_url":"https://codeload.github.com/rciam/simple-oidc-client-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rciam%2Fsimple-oidc-client-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28603310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T12:01:53.233Z","status":"ssl_error","status_checked_at":"2026-01-20T12:01:46.545Z","response_time":117,"last_error":"SSL_read: 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":["oidc","oidc-client","openidconnect","openidconnect-client","php"],"created_at":"2026-01-20T12:04:29.156Z","updated_at":"2026-01-20T12:04:29.259Z","avatar_url":"https://github.com/rciam.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-oidc-client-php\n\nA simple OpenID Connect (OIDC) client in PHP that uses authorization code flow\nand/or [PKCE](https://tools.ietf.org/html/rfc7636)\n\n## Simple OIDC Client - setup\n\nYou can either clone repo from github or download the project from releases.\n(Instructions have been tested on Debian 10 and PHP 7).\n\n### Clone repo\n\nFirst you need to install apache and composer\n\n```shell\nsudo apt-get update\nsudo apt-get install apache2 curl php-cli php-json php-xml git\nphp -r \"copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');\"\nsudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer\n```\n\nClick [here](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos)\nfor more info about composer installation\n\nThen clone the repo to this directory:\n\n```shell\ncd /var/www/html\ngit clone https://github.com/rciam/simple-oidc-client-php.git\n```\n\nInstall the requirements with composer:\n\n```shell\ncd simple-oidc-client-php\ncomposer install\n```\n\n### Download from releases\n\nInstall Apache\n\n```shell\nsudo apt-get update\nsudo apt-get install apache2\n```\n\nDownload the file from releases and extract it in apache home directory\n\n```shell\ncd /var/www/html\nwget https://github.com/rciam/simple-oidc-client-php/releases/download/vX.Y.Z/simple-oidc-client-php-X.Y.Z.tar.gz\ntar -zxvf simple-oidc-client-php-X.Y.Z.tar.gz\n```\n\n## Simple OIDC Client - authentication\n\nNow that you have everything you need, you can configure your login settings in\n`config.php`.\nFirst, copy the configuration file, using the command:\n\n```shell\ncp example-config.php config.php\n```\n\nThen open the file and configure the portal.\n\n```php\n\u003c?php\n\n// index.php interface configuration\n$title = \"Generate Tokens\";\n$img = \"https://www.pngkey.com/png/detail/233-2332677_image-500580-placeholder-transparent.png\";\n$scopeInfo = \"This service requires the following permissions for your account:\";\n\n// Client configuration\n$issuer = \"https://example.com/auth/realms/rciam\";\n$clientId = \"some-client-id\";\n$clientSecret = \"some-client-secret\";  // comment if you are using PKCE\n// $pkceCodeChallengeMethod = \"S256\";   // uncomment to use PKCE\n$redirectPage = \"refreshtoken.php\";  // select between \"refreshtoken.php\" and \"auth.php\"\n$redirectUrl = \"http://localhost/simple-oidc-client-php/\" . $redirectPage;\n// add scopes as keys and a friendly message of the scope as value\n$scopesDefine = array(\n    'openid' =\u003e 'log in using your identity',\n    'email' =\u003e 'read your email address',\n    'profile' =\u003e 'read your basic profile info',\n);\n// refreshtoken.php interface configuration\n$refreshTokenNote = \"NOTE: New refresh tokens expire in 12 months.\";\n$accessTokenNote = \"NOTE: New access tokens expire in 1 hour.\";\n$manageTokenNote = \"You can manage your refresh tokens in the following link: \";\n$manageTokens = $issuer . \"/account/#/applications\";\n$sessionName = \"simple-oidc-client-php\";  // This value must be the same with the name of the parent directory\n$sessionLifetime = 60 * 60;  // must be equal to access token validation time in seconds\n$bannerText = \"\";\n$bannerType = \"info\";  // Select one of \"info\", \"warning\", \"error\" or \"success\"\n$allowIntrospection = false;\n$enableActiveTokensTable = false;  // This option works only for MITREid Connect based OPs\n$showIdToken = false;\n\n```\n\nLet’s go quickly through the settings:\n\n- `title` required, is the title on the navigation bar\n- `img` required, is the source of the logo\n- `scopeInfo` optional, is a message that informs the user for the application\n  requirements\n- `issuer` required, is the base URL of your OpenID Provider instance. This\n  will allow oidc-client to query the metadata endpoint so it can validate the\n  tokens\n- `clientId` required, is the id of the client you want to use when hitting the\n  authorization endpoint\n- `clientSecret` optional, a value the offers better security to the message\n  flow\n- `pkceCodeChallengeMethod` optional, a string that defines the code challenge\n  method for PKCE. Choose between `plain` or `S256`.\n- `redirectPage` required, the page to redirect the user. Currently, there are\n  available 2 pages for that purpose:\n  - `refreshtoken.php`: The users can request Refresh Tokens. Also, they can\n    see all the issued active Refresh Tokens for this client.\n  - `auth.php`: The users can obtain their user information from the obtained\n    Access (and Refresh) Token.\n- `redirectUrl` required, is the redirect URL where the client and the browser\n  agree to send and receive correspondingly the code.\n- `scopesDefine` required, defines the scopes the client supports\n- `refreshTokenNote` optional, info for the refresh token\n- `accessTokenNote` optional, info for the access token\n- `manageTokenNote` optional, message the informs the user where can manage\n  his tokens\n- `manageTokens` optional, URL of the manage tokens service\n- `sessionName` required, define the name of the cookie session. The value must\n  be the same with the name of the parent directory\n- `sessionLifetime` required, define the duration of the session. This must be\n  equal to the validity time of the access token.\n- `bannerText` optional, the text that the banner will contain.\n- `bannerType` required if `bannerText` is omitted, otherwise is optional,\n  define the type (color) of the banner. Options:\n  - `info`\n  - `error`\n  - `success`\n  - `warning`\n- `allowIntrospection` required, define to show/hide the introspection command\n- `enableActiveTokensTable` required, define to show/hide the Active Refresh\n  Token table in `refreshtoken.php`. Important note: This option works only for\n  [MITREid Connect](https://github.com/mitreid-connect/OpenID-Connect-Java-Spring-Server)\n  based OPs!\n- `showIdToken` required, define to show/hide the ID Token from the dashboard\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frciam%2Fsimple-oidc-client-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frciam%2Fsimple-oidc-client-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frciam%2Fsimple-oidc-client-php/lists"}