{"id":17684359,"url":"https://github.com/remove158/chula-sso","last_synced_at":"2026-03-15T09:39:01.762Z","repository":{"id":62916683,"uuid":"532185805","full_name":"remove158/chula-sso","owner":"remove158","description":"A standalone chula-sso-mock based on chula-sso","archived":false,"fork":false,"pushed_at":"2024-02-13T20:22:59.000Z","size":124,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-12T23:53:32.026Z","etag":null,"topics":["chulalongkorn","gin-gonic","golang","sso"],"latest_commit_sha":null,"homepage":"https://sso.piyaphat.com/login?service=https://www.google.com","language":"Go","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/remove158.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-03T07:13:26.000Z","updated_at":"2024-02-13T20:10:36.000Z","dependencies_parsed_at":"2024-06-20T13:00:21.645Z","dependency_job_id":null,"html_url":"https://github.com/remove158/chula-sso","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remove158%2Fchula-sso","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remove158%2Fchula-sso/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remove158%2Fchula-sso/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remove158%2Fchula-sso/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remove158","download_url":"https://codeload.github.com/remove158/chula-sso/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253843185,"owners_count":21972870,"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":["chulalongkorn","gin-gonic","golang","sso"],"created_at":"2024-10-24T10:05:08.191Z","updated_at":"2026-03-15T09:38:56.694Z","avatar_url":"https://github.com/remove158.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Chula SSO\n\nA standalone chula-sso-mock based on [chula-sso](https://account.it.chula.ac.th/wiki/doku.php?id=how_does_it_work)\n\nBeing used in development by [Piyaphat Pinyo](https://www.github.com/remove158)\n\nPlease feel free to use [https://sso.piyaphat.com](https://sso.piyaphat.com/login?service=https://www.google.com)\n\n## Usage\n\nDocker images are available on the [GitHub Packages](https://github.com/remove158/chula-sso/pkgs/container/chula-sso).\n\n1. Install docker\n2. Download the image: `docker pull ghcr.io/remove158/chula-sso:latest`\n3. Run: `docker run -p 8080:8080 ghcr.io/remove158/chula-sso:latest`\n\n## Preview\n\n![img](./preview-1.png)\n\n## Configuration\n\nThe configuration is done by the following environment variables. (see [`docker run`](https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file) on how to set it)\n\n| Name         | Environment Variable | Default |\n| ------------ | -------------------- | ------- |\n| DeeAppId     | DEE_APP_ID           | test    |\n| DeeAppSecret | DEE_APP_SECRET       | test    |\n| Port         | PORT                 | 8080    |\n\n## Endpoint\n\n### GET /login\n\n-   Request\n\n```sh\ncurl --request GET \\\n  --url 'https://sso.piyaphat.com/login?service=https://www.google.com'\n```\n\n-   Response 302 Found\n\n```js\n// (on-success) 302 Location: https://www.google.com?ticket=86966dc5-2049-428f-88fe-2d78a5985d38\n```\n\n-   Response 400 Bad Request\n\n```json\n{\n    \"error\": \"Key: 'GetLoginRequest.Service' Error:Field validation for 'Service' failed on the 'required' tag\"\n}\n```\n\n### GET, POST /serviceValidation\n\n-   Request\n\n```sh\ncurl --request POST \\\n  --url 'https://sso.piyaphat.com/serviceValidation' \\\n  --header 'DeeAppId: test' \\\n  --header 'DeeAppSecret: test' \\\n  --header 'DeeTicket: 1b50cf0d-ceed-46da-a672-4c61060ece8d'\n```\n\n-   Response 200 (application/json)\n\n```json\n{\n    \"uid\": \"14c6c69f-21ca-4999-999c-423dde2515ad\",\n    \"username\": \"6200000021\",\n    \"gecos\": \"Prayut Chan-Angkhan, ENG\",\n    \"disable\": false,\n    \"roles\": [\"student\"],\n    \"firstname\": \"Prayut\",\n    \"firstnameth\": \"Prayut\",\n    \"lastname\": \"Chan-Angkhan\",\n    \"lastnameth\": \"Chan-Angkhan\",\n    \"ouid\": \"6200000021\",\n    \"email\": \"6200000021@student.chula.ac.th\"\n}\n```\n\n-   Response 401 Unauthorized\n\n```json\n{\n    \"error\": \"ticket not found\"\n}\n```\n\n## Diagram\n\n### Login\n\n```mermaid\nsequenceDiagram\n    Client-\u003e\u003eSSO: GET: /login?service=https://www.google.com\n    alt provide service\n        SSO-\u003e\u003eClient: 302 Found\n    else didn't provide service\n        SSO-\u003e\u003eClient: 400 Bad Request\n    end\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremove158%2Fchula-sso","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremove158%2Fchula-sso","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremove158%2Fchula-sso/lists"}