{"id":47592066,"url":"https://github.com/deskpro/deskpro-jwt-example","last_synced_at":"2026-04-01T17:37:12.912Z","repository":{"id":21879306,"uuid":"25202954","full_name":"deskpro/deskpro-jwt-example","owner":"deskpro","description":"Example JWT implementation for DeskPRO auth","archived":false,"fork":false,"pushed_at":"2024-02-22T14:35:14.000Z","size":32,"stargazers_count":1,"open_issues_count":3,"forks_count":2,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-04-14T07:52:38.837Z","etag":null,"topics":["example","product"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"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/deskpro.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":"2014-10-14T11:20:43.000Z","updated_at":"2024-01-31T18:47:28.000Z","dependencies_parsed_at":"2022-08-17T22:05:25.307Z","dependency_job_id":null,"html_url":"https://github.com/deskpro/deskpro-jwt-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deskpro/deskpro-jwt-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deskpro%2Fdeskpro-jwt-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deskpro%2Fdeskpro-jwt-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deskpro%2Fdeskpro-jwt-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deskpro%2Fdeskpro-jwt-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deskpro","download_url":"https://codeload.github.com/deskpro/deskpro-jwt-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deskpro%2Fdeskpro-jwt-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"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":["example","product"],"created_at":"2026-04-01T17:37:12.189Z","updated_at":"2026-04-01T17:37:12.901Z","avatar_url":"https://github.com/deskpro.png","language":"PHP","readme":"# JWT Server Implementation\n\nIntended to be used in the native DeskPRO app \"JWT Auth\" app for testing purposes.\n\n## Setup\n\nSTEP 1: cd to this directory and install vendors:\n\ncomposer install\n\nSTEP 2: start the local server\n\nphp -S localhost:8003\n\nSTEP 3: Add the JWT auth app with the following:\n\n - Make sure that \"Enabled\" is checked\n - Secret: deskpro_secret\n - Remote Login URL: http://localhost:8003/jwt_login.php\n - Decrypt Algorithm: HS256\n - Custom Button Text: \"Company XYZ\"\n - Agent (or User) Logout Redirect: http://google.com\n\nThese values work for this test server. Obviously, these values should change to be whatever values work with your implementation. When you change your secret, you'll need to update the JWT app in your helpdesk. Same with your endpoint, and the logout URL. \n\nThe Custom Button Text is optional, and is only useful if you want to allow the user to click a button to login with JWT (it will simply direct the user to your Remote Login URL with the proper return URL).\n\n## Use\n\nSTEP 4: After you install the app, you can use the \"TEST\" button to test your implementation. If you change settings be sure to save before using the \"TEST\" button.\n\nSTEP 5: Now login to DeskPRO using it. If you enabled automatic SSO, then it will just work. If you use background SSO, it will only work if you are authenticated at the remote site. If you disable SSO you can only authenticate by clicking the \"Login with Company XYZ\" button.\n\nSTEP 6: visiting http://localhost:8003 shows you that you can link back to your helpdesk from within your site, and the SSO rules will just work. Logout of deskpro and head to this url and click on the link that is secured by this JWT server (first, make sure config.php has the right URLs). If automatic SSO is enabled you will be \"magically\" authenticated, just by clicking that link.\n\n### Valid Logins\n\n\n| User | Pass  |\n|-------|---------|\n| cp\t| user1 |\n| cn\t| user2 |\n| ct\t| user3 |\n| user\t| user \t|\n| admin| admin |\n\nThis list is in AuthSystem.php\n\n## Technical Notes\n\n- The DeskPRO system only uses the JWT once, during initial authentication callback. We do not store the JWT and process it on every request. Instead, the normal DeskPRO session takes over after the initial send of the token.\n\n- Your DeskPRO URL must be http://localhost:8888/ for this demo to work fully. Edit config.php if it is not.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeskpro%2Fdeskpro-jwt-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeskpro%2Fdeskpro-jwt-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeskpro%2Fdeskpro-jwt-example/lists"}