{"id":16902008,"url":"https://github.com/jpf/okta-simplesamlphp-example","last_synced_at":"2025-04-11T05:32:55.150Z","repository":{"id":31261516,"uuid":"34823207","full_name":"jpf/okta-simplesamlphp-example","owner":"jpf","description":"An example PHP application that uses SimpleSAMLphp","archived":false,"fork":false,"pushed_at":"2015-10-08T21:53:02.000Z","size":152,"stargazers_count":15,"open_issues_count":3,"forks_count":16,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-04T14:41:32.851Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jpf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-29T23:14:19.000Z","updated_at":"2025-03-13T02:17:42.000Z","dependencies_parsed_at":"2022-09-09T01:22:42.753Z","dependency_job_id":null,"html_url":"https://github.com/jpf/okta-simplesamlphp-example","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/jpf%2Fokta-simplesamlphp-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpf%2Fokta-simplesamlphp-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpf%2Fokta-simplesamlphp-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jpf%2Fokta-simplesamlphp-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jpf","download_url":"https://codeload.github.com/jpf/okta-simplesamlphp-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248347694,"owners_count":21088719,"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-10-13T18:03:27.565Z","updated_at":"2025-04-11T05:32:54.894Z","avatar_url":"https://github.com/jpf.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nThis is an example PHP application that makes use of the\n[SimpleSAMLphp](https://simplesamlphp.org/) library support Single Sign-On with SAML.\n\n# Requirements\n\nThis example application depends on SimpleSAMLphp being installed in\n\"../simplesamlphp\". Meaning, this example expects SimpleSAMLphp to\nbe installed one level up from this example in a folder called\n\"simplesamlphp\".\n\n# Setting up Okta\n\nBefore you can configure your application SimpleSAMLphp you \nwill need to set up an Okta \"[chiclet](https://support.okta.com/articles/Knowledge_Article/27838096-Okta-Terminology)\" (application icon) that enables an Okta \nuser to sign in to your to your application with SAML and SimpleSAMLphp.\n\nTo set up Okta to connect to your application, follow the\n[setting up a SAML application in Okta](http://developer.okta.com/docs/guides/setting_up_a_saml_application_in_okta.html) guide. \nAs noted in the instructions, there are two steps to change:\n\n**In step #6**: \n\nUse \"SimpleSAMLphp Example\" instead of \"Example SAML application\".\n\n**In step #7**: \n\nWhen entering the URL\n\n```\nhttp://example.com/saml/sso/example-okta-com\n```\n\ninstead, use the following:\n\nFor \"Single sign on URL\" use:\n\n```\nhttp://PATH_TO_INSTALL_DIRECTORY/simplesamlphp/www/module.php/saml/sp/saml2-acs.php/example\n```\n\nFor \"Audience URI (SP Entity ID)\" use:\n\n```\nhttp://PATH_TO_INSTALL_DIRECTORY/simplesamlphp/www/module.php/saml/sp/metadata.php/example\n```\n\nFor \"Default RelayState\" use:\n\n```\nhttp://PATH_TO_INSTALL_DIRECTORY/okta-simplesamlphp-example/?saml_sso=example\n```\n\n**Note:**\n\"PATH\\_TO\\_INSTALL\\_DIRECTORY\" is the full path to the directory where SimpleSAMLphp and this application reside.\nIt might look like: \"example.com\" or might contain a path like \"example.com/path\". \nThis will depend on how your webserver is set up.\n\n# Setting up SimpleSAMLphp\n\n1.  Use \\`git clone\\` to pull down this git repository.\n2.  Copy the \\`saml-autoconfig.php\\` file to the directory for SimpleSAMLphp.\n    Assuming that you cloned this repository to the same level as\n    SimpleSAMLphp, this is the command you will use to do this:\n    \n    ```shell \n    $ cp okta-simplesamlphp-example/saml-autoconfig.php simplesamlphp/ \n    ```\n3.  In the 'simplesamlphp' directory, \n    edit the \\`config/authsources.php\\` \n    and \\`metadata/saml20-idp-remote.php\\` files and add the line below to each file:\n    \n    ```php\n    require(dirname(__FILE__).'/../saml-autoconfig.php');\n    ```\n4.  Finally, open the \\`saml-autoconfig.php\\` file in your favorite text editor.\n    In the \\`$metadata\\_url\\_for\\\\\\` array, add an entry where the key is a\n    string like \"example\" and the value is the metadata URL you got\n    from the \"Setting up Okta\" section above. It should look like this:\n    \n    ```php\n    $metadata_url_for = array(\n        'example' =\u003e 'https://example.okta.com/app/abc0de1fghIjKlMNo2p3/sso/saml/metadata',\n    );\n    ```\n\n# Testing\n\n1.  Load the URL for \\`okta-simplesamlphp-example/index.php\\` in your web browser. \n    Try to log in to the 'example' IdP.\n2.  In Okta, try clicking on the \"SimpleSAMLphp Example\" chiclet.\n\n# Contact\n\nUpdates or corrections to this document are very welcome. Feel free\nto send me [pull requests](https://help.github.com/articles/using-pull-requests/) with suggestions.\n\n\nAdditionally, please send me comments or questions via email: \u0026#106;\u0026#111;\u0026#101;\u0026#108;\u0026#046;\u0026#102;\u0026#114;\u0026#097;\u0026#110;\u0026#117;\u0026#115;\u0026#105;\u0026#099;\u0026#064;\u0026#111;\u0026#107;\u0026#116;\u0026#097;\u0026#046;\u0026#099;\u0026#111;\u0026#109;","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpf%2Fokta-simplesamlphp-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjpf%2Fokta-simplesamlphp-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjpf%2Fokta-simplesamlphp-example/lists"}